开发者

Error: Terminating app due to uncaught exception 'NSInternalInconsistencyException'

I am getting error on debugger:

开发者_JAVA技巧

cocos2d: CCTexture2D. Can't create Texture. UIImage is nil cocos2d: Couldn't add image:bg.png in CCTextureCache * Assertion failure in -[StartTrain addChild:z:tag:], /Users/nishant/Downloads/AnimBear 2/libs/cocos2d/CCNode.m:370 * Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Argument must be non-nil'

An Application runs on simulator but not on actual device. please help.. :(


Is your device an iPhone 4? Someone on the cocos2d-iphone forums had a similar problem; this thread documents what he tried and what ended up solving the problem. It's possible that the hd version of the image you are trying to load is too large or is not in the correct format.

If you are running 0.99.5 rc1, you may also want to upgrade to the release version of 0.99.5, as mentioned in this thread about another similar problem.


I had a similar problem, the name of the file was correct, format was correct (was .png) and I had cleaned in xcode and deleted the app from my iphone, yet I still had the error.

As someone else said in the comment, the size of the sprite just might be too large (depending on your memory usage). For me I had all sorts of sprites and stuff flying over the screen. So I resized it and it currently runs perfect.

Also I was using a iPhone 3G.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜