========================================================== =============================== Original blog, reprinted please declare the source of Electronic coffee (original id blue rock) ========================================================== ================================
Error reported when xcode runs on a real machine
While reading /Users/yangeric/mIOS/MeiTu/MeiTu/Image/BackgroundHomeScreen_5.png pngcrush caught libpng error:
The reason is that the prompt PNG is not a PNG in PS, but a PNG extension is manually modified. No error is reported on the simulator, but on the real machine, this so-called "PNG" image is not recognized.
Solution:
Use PS to re-export PNG.
Attached Error 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.pngCommand /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