iOS 真机调试时出现CopyPngFile error解决方法

应用在在模拟器上调试一点问题没有,但一放到真机上调试就出现copypngfile 的错误,错误信息如下:

CopyPNGFile /Users/gongihou/Library/Developer/Xcode/DerivedData/DLZ-frborfduejxrajgpkfdaipygijow/Build/Products/Debug-iphoneos/DLZ.app/zhuangtai.png DLZ/zhuangtai.png

    cd /Users/gongihou/Documents/910

    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/gongihou/Documents/910/DLZ/zhuangtai.png /Users/gongihou/Library/Developer/Xcode/DerivedData/DLZ-frborfduejxrajgpkfdaipygijow/Build/Products/Debug-iphoneos/DLZ.app/zhuangtai.png


   Not a PNG filCommand /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


说是读取的时候没有找到这张图片,检查了一下图片路径,没有问题,于是google之,找到两种解决方法 :

1.在build settings里把工程里的Compress PNG files设置为NO,问题解决,但这样设置以后,弄出来的ipa会很大,感觉不是很理想。


2.mac上的preview(预览)打开出问题的png文件,然后重新导出为png文件或者用photoshop把png图片保存为NOT INTERLACED(不交错)的,这样真机 调试时就没有错误了。
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值