Images won't show up

爱⌒轻易说出口 提交于 2019-12-13 06:18:05

问题


Using cocos2d I put images on desktop and drag them to resource file in my project. It worked before but not any more. Any tips to solve this?

The error:

012-08-10 15:30:55.884 again[9753:1be03] cocos2d: Couldn't add image:soundoff.png in CCTextureCache


回答1:


Two possible reasons why you could observer that behavior:

  1. the filename contains mixed lowercase/uppercase; this is typical, since iOS is case sensitive, while MacOS is not; so, it may happen that it works in the simulator, but fails on the device; or, if you rename a file by changing uppercase/lowercas (e.g., soundOff to soundoff), the build system on MacOS will not consider the renamed file as different from the original one and will not include it in the build;

  2. the file has not been actually added to the "copy phase" for your target (check the target's build phases).

Hope it helps.



来源:https://stackoverflow.com/questions/11908844/images-wont-show-up

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!