解决方案:
该图像不是“真正的” .png 文件,我刚刚更改了扩展名。我下载了一个 png 文件,现在它可以工作了!
我用 cocos2D 完成了一个简单的游戏,我正试图在我的 iphone 5 上运行它。图标加载和 laungh 图像加载,但随后我收到一条带有错误等的长消息。例如它找不到图像文件,即使它们位于正确的位置并且拼写正确。
该游戏在模拟器中运行良好,我下载的另一个 cocos2D 游戏在我的 iPhone 上运行良好。我有 IOS 7 测试版,但没关系,因为我下载的游戏在其中运行良好。
有人知道它可能是什么吗?
提前致谢!
编辑:
这是我在控制台中得到的全部错误:
cocos2d: cocos2d-iphone v2.1
cocos2d: compiled with Profiling Support: NO
cocos2d: OS version: 7.0 (0x07000000)
cocos2d: GL_VENDOR: Imagination Technologies
cocos2d: GL_RENDERER: PowerVR SGX 543
cocos2d: GL_VERSION: OpenGL ES 2.0 IMGSGX543-95
cocos2d: GL_MAX_TEXTURE_SIZE: 4096
cocos2d: GL_MAX_TEXTURE_UNITS: 8
cocos2d: GL_MAX_SAMPLES: 4
cocos2d: GL supports PVRTC: YES
cocos2d: GL supports BGRA8888 textures: YES
cocos2d: GL supports NPOT textures: YES
cocos2d: GL supports discard_framebuffer: YES
cocos2d: GL supports shareable VAO: NO
2013-08-16 00:28:34.936 brick jumper[3349:60b] cocos2d: animation started with frame interval: 60.00
2013-08-16 00:28:34.950 brick jumper[3349:60b] cocos2d: surface size: 1136x640
2013-08-16 00:28:35.001 brick jumper[3349:60b] -[CCFileUtils fullPathForFilename:resolutionType:] : cocos2d: Warning: File not found: wall.png
2013-08-16 00:28:35.002 brick jumper[3349:60b] cocos2d: Couldn't find file:wall.png
2013-08-16 00:28:35.004 brick jumper[3349:60b] *** Assertion failure in -[HelloWorldLayer addChild:], /Users/tonymichaelsen/Documents/documents/Xcode-projects/brick jumper/brick jumper/libs/cocos2d/CCNode.m:382
2013-08-16 00:28:35.005 brick jumper[3349:60b] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Argument must be non-nil'
*** First throw call stack:
(0x2fa944a3 0x39a926c7 0x2fa94375 0x30451c03 0x54c37 0xc8ab5 0x530ad 0xc86f3 0xc98cf 0xb42b5 0xb2ed9 0x55d15 0x3080b 0xaa0b5 0x303e553d 0x3040e4f5 0xaa84f 0xc7b73 0xab009 0xae3fd 0x320c6b2b 0x31d5b893 0x31d5b457 0x31d89f95 0x32163f07 0x32162fa9 0x3216222f 0x322856a9 0x321621f7 0x32285461 0x32123ee7 0x32123b61 0x32123485 0x32119573 0x32115c15 0x32152edd 0xc817f 0x3211a375 0x32119dbb 0x32112ad5 0x320c4a1b 0x320c3d11 0x320c3af9 0x34543bc5 0x345437af 0x2fa5bfdf 0x2fa5bf7b 0x2fa5a737 0x2f9d0d09 0x2f9d0aeb 0x32111791 0x3210d4ad 0xc799b 0x2b08)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)