9
运行新的LibGDX项目时出现“找不到文件”
我尝试学习LibGDX,并在新的格式化的Mac OS X Maverick上安装了此处列出的所有软件以及新的Eclipse 4.3。 重启后一切顺利,我下载并执行gdx-setup.jar,填写表单,然后导入Eclipse。 当我尝试运行桌面时,没有错误,没有警告。(右键单击桌面项目,运行方式-> Java应用程序)。 我得到这个错误 Exception in thread "LWJGL Application" com.badlogic.gdx.utils.GdxRuntimeException: Couldn't load file: badlogic.jpg at com.badlogic.gdx.graphics.Pixmap.<init>(Pixmap.java:140) at com.badlogic.gdx.graphics.glutils.FileTextureData.prepare(FileTextureData.java:64) at com.badlogic.gdx.graphics.Texture.load(Texture.java:130) at com.badlogic.gdx.graphics.Texture.<init>(Texture.java:121) at com.badlogic.gdx.graphics.Texture.<init>(Texture.java:100) at com.badlogic.gdx.graphics.Texture.<init>(Texture.java:92) at com.diesel.bugs.DieselBugs.create(DieselBugs.java:21) at com.badlogic.gdx.backends.lwjgl.LwjglApplication.mainLoop(LwjglApplication.java:136) at com.badlogic.gdx.backends.lwjgl.LwjglApplication$1.run(LwjglApplication.java:114) Caused by: com.badlogic.gdx.utils.GdxRuntimeException: File not found: badlogic.jpg (Local) at com.badlogic.gdx.files.FileHandle.read(FileHandle.java:134) at com.badlogic.gdx.files.FileHandle.readBytes(FileHandle.java:218) at …