xcode运行到真机报错 While reading xx.png pngcrush caught libpng

shi0 2013-11-13

xcode运行到真机报错

While checking alphas in /Users/qianhaiyuan/Desktop/hy_mobile_ios/hy_Iphone/images/firstpage/log_reg_board.png pngcrush caught libpng error:   Not enough image dCommand /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

 原因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.png hy_Iphone/images/firstpage/log_reg_board.png
    cd /Users/qianhaiyuan/Desktop/hy_mobile_ios
    setenv PATH "/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

While checking alphas in /Users/qianhaiyuan/Desktop/hy_mobile_ios/hy_Iphone/images/firstpage/log_reg_board.png pngcrush caught libpng error:   Not enough image dCommand /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 checking alphas in /Users/qianhaiyuan/Desktop/hy_mobile_ios/hy_Iphone/images/firstpage/log_reg_board.png pngcrush caught libpng error:

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

相关推荐

APCDE / 0评论 2019-12-01
野生的世界 / 0评论 2015-10-29