xcode運行到真機報錯
Whilecheckingalphasin/Users/qianhaiyuan/Desktop/hy_mobile_ios/hy_Iphone/images/firstpage/log_reg_board.pngpngcrushcaughtlibpngerror:NotenoughimagedCommand/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/copypngemittederrorsbutdidnotreturnanonzeroexitcodetoindicatefailure
原因1. 是提示的png并不是ps導出的png昌抠,而是手動修改jpeg后綴名為png脐嫂,在模擬器上不會報錯扮宠,但在真機艰躺,不 識別這種所謂 的“png”圖片澜术。(隨便批下美工)
原因2:這是因為png圖片的問題卧土,png圖片在存儲的時候有一個NOT INTERLACED/INTERLACED(無交錯/交錯)的選項复唤,因為設計師在切圖的時候的存儲錯誤夭问,圖片在XCode中就會報這個錯誤,但是還是會編譯成功并運行,請設計師將圖片重新按無交錯存儲就行了残吩。
解決方案:
用ps重新導出png就ok了
附加錯誤信息:
CopyPNGFile/Users/qianhaiyuan/Library/Developer/Xcode/DerivedData/hy_Iphone-fndcbhhncozyqxamvodebsxiwyod/Build/Products/Debug-iphoneos/hy_Iphone.app/log_reg_board.pnghy_Iphone/images/firstpage/log_reg_board.png cd/Users/qianhaiyuan/Desktop/hy_mobile_ios setenvPATH"/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin" /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/copypng-compress""/Users/qianhaiyuan/Desktop/hy_mobile_ios/hy_Iphone/images/firstpage/log_reg_board.png/Users/qianhaiyuan/Library/Developer/Xcode/DerivedData/hy_Iphone-fndcbhhncozyqxamvodebsxiwyod/Build/Products/Debug-iphoneos/hy_Iphone.app/log_reg_board.png Whilecheckingalphasin/Users/qianhaiyuan/Desktop/hy_mobile_ios/hy_Iphone/images/firstpage/log_reg_board.pngpngcrushcaughtlibpngerror:NotenoughimagedCommand/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/copypngemittederrorsbutdidnotreturnanonzeroexitcodetoindicatefailure (null):Whilecheckingalphasin/Users/qianhaiyuan/Desktop/hy_mobile_ios/hy_Iphone/images/firstpage/log_reg_board.pngpngcrushcaughtlibpngerror: Command/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/copypngemittederrorsbutdidnotreturnanonzeroexitcodetoindicatefailure
以上就是xcode運行到真機報錯 圖片問題的全文介紹,希望對您學習和使用ios應用開發(fā)有所幫助.