0
我正在使用libGDX v 1.2.0並在eclipse中安裝了roboVM plugin 0.0.14。我創建了一個在桌面和iOS模擬器(iOS 7.1)上按預期工作的應用程序,但是當我將它設置爲在運行iOS 7.1的iPhone 4上運行時,它會安裝並顯示libGDX啓動畫面,然後崩潰並顯示控制檯顯示這個錯誤究竟是什麼libgdx崩潰在iphone之後由於屏幕不清而導致閃屏
com.badlogic.gdx.utils.GdxRuntimeException: Couldn't load file: noodle.png
at com.badlogic.gdx.graphics.Pixmap.<init>(Pixmap.java)
at com.badlogic.gdx.graphics.glutils.FileTextureData.prepare(FileTextureData.java)
at com.badlogic.gdx.graphics.Texture.load(Texture.java)
at com.badlogic.gdx.graphics.Texture.<init>(Texture.java)
at com.badlogic.gdx.graphics.Texture.<init>(Texture.java)
at com.badlogic.gdx.graphics.Texture.<init>(Texture.java)
at com.badlogic.gdx.graphics.Texture.<init>(Texture.java)
at com.chiefpeanut.noodle.Assets.load(Assets.java)
at com.chiefpeanut.noodle.MyGame.create(MyGame.java)
at com.badlogic.gdx.backends.iosrobovm.IOSGraphics.draw(IOSGraphics.java)
at com.badlogic.gdx.backends.iosrobovm.IOSGraphics$1.draw(IOSGraphics.java)
at org.robovm.apple.uikit.UIView.$cb$drawRect$(UIView.java)
at org.robovm.apple.uikit.UIApplication.main(Native Method)
at org.robovm.apple.uikit.UIApplication.main(UIApplication.java)
at com.chiefpeanut.noodle.IOSLauncher.main(IOSLauncher.java)
Caused by: java.io.IOException: couldn't load pixmap bad zlib header
at com.badlogic.gdx.graphics.g2d.Gdx2DPixmap.<init>(Gdx2DPixmap.java)
... 15 more
是造成這個錯誤,爲什麼它只是我的手機,而不是模擬器上進行。
非常感謝您的幫助!
我想通了!我將盡快發佈答案 – user3773207
可能是文件名問題。在模擬器中運行時的文件系統不區分大小寫,而iOS設備上的文件系統區分大小寫。檢查你在代碼和文件系統中使用了正確的外殼。 – ntherning