xcode运行到真机报错 图片问题
2016-05-04 10:50
405 查看
xcode运行到真机报错
C代码
![](http://zfanxu.iteye.com/images/icon_star.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
原因1. 是提示的png并不是ps导出的png,而是手动修改jpeg后缀名为png,在模拟器上不会报错,但在真机,不 识别这种所谓 的“png”图片。(随便批下美工)
原因2:这是因为png图片的问题,png图片在存储的时候有一个NOT
INTERLACED/INTERLACED(无交错/交错)的选项,因为设计师在切图的时候的存储错误,图片在XCode中就会报这个错误,但是还是会编译成功并运行,请设计师将图片重新按无交错存储就行了。
解决方案:
用ps重新导出png就ok了
附加错误信息:
C代码
![](http://zfanxu.iteye.com/images/icon_star.png)
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
C代码
![](http://zfanxu.iteye.com/images/icon_star.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
原因1. 是提示的png并不是ps导出的png,而是手动修改jpeg后缀名为png,在模拟器上不会报错,但在真机,不 识别这种所谓 的“png”图片。(随便批下美工)
原因2:这是因为png图片的问题,png图片在存储的时候有一个NOT
INTERLACED/INTERLACED(无交错/交错)的选项,因为设计师在切图的时候的存储错误,图片在XCode中就会报这个错误,但是还是会编译成功并运行,请设计师将图片重新按无交错存储就行了。
解决方案:
用ps重新导出png就ok了
附加错误信息:
C代码
![](http://zfanxu.iteye.com/images/icon_star.png)
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
相关文章推荐
- 峰回路转,Firefox 浏览器即将重返 iOS 平台
- 峰回路转,Firefox 浏览器即将重返 iOS 平台
- 不可修补的 iOS 漏洞可能导致 iPhone 4s 到 iPhone X 永久越狱
- iOS 12.4 系统遭黑客破解,漏洞危及数百万用户
- 每日安全资讯:NSO,一家专业入侵 iPhone 的神秘公司
- [转][源代码]Comex公布JailbreakMe 3.0源代码
- 讲解iOS开发中基本的定位功能实现
- iOS中定位当前位置坐标及转换为火星坐标的方法
- js判断客户端是iOS还是Android等移动终端的方法
- iOS应用中UISearchDisplayController搜索效果的用法
- IOS开发环境windows化攻略
- iOS应用中UITableView左滑自定义选项及批量删除的实现
- 浅析iOS应用开发中线程间的通信与线程安全问题
- 检测iOS设备是否越狱的方法
- .net平台推送ios消息的实现方法
- 探讨Android与iOS,我们将何去何从?
- Android、iOS和Windows Phone中的推送技术详解
- iOS推送的那些事
- IOS 改变键盘颜色代码