最近的迭代一个老项目发现了一些错误,记录一下。
类似出现编译错误如下:
While reading /Users/cola/Desktop/csun first 2/Res/Quasar/Quasar_Tex_Up.png pngcrush caught libpng error:
g\225Command /Applications/Xcode.app/Contents/Developer/usr/bin/copypng emitted errors but did not return a nonzero exit code to indicate failure
在模拟器上跑 不会出问题,在真机上一跑就报了两错。第一 ,有可能是将图片的后缀强行改成了 .PNG 并非美工导出图片的格式是.PNG 这里会报这样的错误。解决办法 当然是要重新弄一下这样的图片咯。
第二,有可能在项目的copy bundle Resource中add了两个一样的image,在project->target ->copy bundle resource里查看下 报错的png 然后删掉一个。
可以参考这个:http://stackoverflow.com/questions/13679710/not-a-png-filcommand-copypng-emitted-errors-but-did-not-return-a-nonzero-exit-co