转自:http://blog.csdn.net/shencaifeixia1/article/details/8976756
xcode运行到真机报错
- While reading /Users/yangeric/mIOS/MeiTu/MeiTu/Image/BackgroundHomeScreen_5.png pngcrush caught libpng error:
解决方案:
用ps重新导出png就ok了
附上错误log:
- (null): While reading /Users/yangeric/mIOS/MeiTu/MeiTu/Image/BackgroundHomeScreen_5.png pngcrush caught libpng error:
- (null): Could not find file: /Users/yangeric/Library/Developer/Xcode/DerivedData/MeiTu-axtpdkzrafpqwueeqfkdldtmiyjn/Build/Products/Debug-iphoneos/MeiTu.app/BackgroundHomeScreen_5.png
- Command /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/copypng emitted errors but did not return a nonzero exit code to indicate failure
- (null): While reading /Users/yangeric/mIOS/MeiTu/MeiTu/Image/BackgroundHomeScreen@2x.png pngcrush caught libpng error:
- (null): Could not find file: /Users/yangeric/Library/Developer/Xcode/DerivedData/MeiTu-axtpdkzrafpqwueeqfkdldtmiyjn/Build/Products/Debug-iphoneos/MeiTu.app/BackgroundHomeScreen@2x.png
- (null): While reading /Users/yangeric/mIOS/MeiTu/MeiTu/Image/BackgroundHomeScreen_5@2x.png pngcrush caught libpng error:
- (null): Could not find file: /Users/yangeric/Library/Developer/Xcode/DerivedData/MeiTu-axtpdkzrafpqwueeqfkdldtmiyjn/Build/Products/Debug-iphoneos/MeiTu.app/BackgroundHomeScreen_5@2x.png
- (null): While reading /Users/yangeric/mIOS/MeiTu/MeiTu/Image/BackgroundHomeScreen.png pngcrush caught libpng error:
- (null): Could not find file: /Users/yangeric/Library/Developer/Xcode/DerivedData/MeiTu-axtpdkzrafpqwueeqfkdldtmiyjn/Build/Products/Debug-iphoneos/MeiTu.app/BackgroundHomeScreen.png
- (null): While reading /Users/yangeric/mIOS/MeiTu/MeiTu/Image/BackgroundLockScreen_5.png pngcrush caught libpng error:
- (null): Could not find file: /Users/yangeric/Library/Developer/Xcode/DerivedData/MeiTu-axtpdkzrafpqwueeqfkdldtmiyjn/Build/Products/Debug-iphoneos/MeiTu.app/BackgroundLockScreen_5.png
- (null): While reading /Users/yangeric/mIOS/MeiTu/MeiTu/Image/BackgroundLockScreen_5@2x.png pngcrush caught libpng error:
- (null): Could not find file: /Users/yangeric/Library/Developer/Xcode/DerivedData/MeiTu-axtpdkzrafpqwueeqfkdldtmiyjn/Build/Products/Debug-iphoneos/MeiTu.app/BackgroundLockScreen_5@2x.png
- (null): While reading /Users/yangeric/mIOS/MeiTu/MeiTu/Image/BackgroundLockScreen.png pngcrush caught libpng error:
- (null): Could not find file: /Users/yangeric/Library/Developer/Xcode/DerivedData/MeiTu-axtpdkzrafpqwueeqfkdldtmiyjn/Build/Products/Debug-iphoneos/MeiTu.app/BackgroundLockScreen.png
- (null): While reading /Users/yangeric/mIOS/MeiTu/MeiTu/Image/BackgroundLockScreen@2x.png pngcrush caught libpng error:
- (null): Could not find file: /Users/yangeric/Library/Developer/Xcode/DerivedData/MeiTu-axtpdkzrafpqwueeqfkdldtmiyjn/Build/Products/Debug-iphoneos/MeiTu.app/BackgroundLockScreen@2x.png
本文解决了一个关于在Xcode中使用非标准PNG图片导致真机运行时报错的问题。原因是图片实际上是JPEG格式但被错误地标记为PNG。解决方法是确保所有图片文件格式正确,并建议使用Photoshop等专业工具导出。

3019

被折叠的 条评论
为什么被折叠?



