所以,我用 libGDX 制作了雨滴教程项目。但是,当我尝试将其部署到模拟器时,我收到一条错误消息,指出该图像不是 2 的幂。但我确实使用 GIMP 将图像大小重新调整为 48X48(如教程所建议的那样)。我相信他已经添加了一些代码,以确保可以添加不一定是 2 次方的图像?
有谁知道我会如何解决这个问题?使它成为 2 的幂有点限制.. 不是吗?我非常密切地遵循教程!所以......我不知道从这里去哪里。libGDX 的菜鸟。
LogCat 转储:
06-11 00:22:50.942: W/dalvikvm(545): threadid=11: thread exiting with uncaught exception (group=0x409c01f8)
06-11 00:22:50.952: E/AndroidRuntime(545): FATAL EXCEPTION: GLThread 72
06-11 00:22:50.952: E/AndroidRuntime(545): com.badlogic.gdx.utils.GdxRuntimeException: Texture width and height must be powers of two: 48x48
06-11 00:22:50.952: E/AndroidRuntime(545): at com.badlogic.gdx.graphics.Texture.uploadImageData(Texture.java:197)
06-11 00:22:50.952: E/AndroidRuntime(545): at com.badlogic.gdx.graphics.Texture.load(Texture.java:179)
06-11 00:22:50.952: E/AndroidRuntime(545): at com.badlogic.gdx.graphics.Texture.create(Texture.java:159)
06-11 00:22:50.952: E/AndroidRuntime(545): at com.badlogic.gdx.graphics.Texture.<init>(Texture.java:133)
06-11 00:22:50.952: E/AndroidRuntime(545): at com.badlogic.gdx.graphics.Texture.<init>(Texture.java:122)
06-11 00:22:50.952: E/AndroidRuntime(545): at com.badlogic.drop.Drop.create(Drop.java:38)
06-11 00:22:50.952: E/AndroidRuntime(545): at com.badlogic.gdx.backends.android.AndroidGraphics.onSurfaceChanged(AndroidGraphics.java:292)
06-11 00:22:50.952: E/AndroidRuntime(545): at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1455)
06-11 00:22:50.952: E/AndroidRuntime(545): at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1216)
06-11 00:22:51.041: I/AndroidInput(545): sensor listener tear down
06-11 00:22:51.041: I/AndroidGraphics(545): Managed meshes/app: { }
06-11 00:22:51.041: I/AndroidGraphics(545): Managed textures/app: { }
06-11 00:22:51.041: I/AndroidGraphics(545): Managed shaders/app: { }
06-11 00:22:51.041: I/AndroidGraphics(545): Managed buffers/app: { }