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

xcode运行到真机报错

 

C代码   收藏代码
  1. 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代码   收藏代码
  1. 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  
  2.     cd /Users/qianhaiyuan/Desktop/hy_mobile_ios  
  3.     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"  
  4.     /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  
  5.   
  6. 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  
  7.   
  8. (null): While checking alphas in /Users/qianhaiyuan/Desktop/hy_mobile_ios/hy_Iphone/images/firstpage/log_reg_board.png pngcrush caught libpng error:  
  9.   
  10. 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  
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值