您的位置:首页 > 移动开发 > IOS开发

xcode运行到真机报错 图片问题

2016-05-04 10:50 405 查看
xcode运行到真机报错

 

C代码  


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了

 

附加错误信息:

C代码  


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
4000
 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
 
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  iOS 图片格式不对