iOS常见功能demo

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

2016-08-26  本文已影响106人  未来可期me

xcode运行到真机报错

Whilecheckingalphasin/Users/qianhaiyuan/Desktop/hy_mobile_ios/hy_Iphone/images/firstpage/log_reg_board.pngpngcrushcaughtlibpngerror:NotenoughimagedCommand/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/copypngemittederrorsbutdidnotreturnanonzeroexitcodetoindicatefailure

原因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.pnghy_Iphone/images/firstpage/log_reg_board.png cd/Users/qianhaiyuan/Desktop/hy_mobile_ios setenvPATH"/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 Whilecheckingalphasin/Users/qianhaiyuan/Desktop/hy_mobile_ios/hy_Iphone/images/firstpage/log_reg_board.pngpngcrushcaughtlibpngerror:NotenoughimagedCommand/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/copypngemittederrorsbutdidnotreturnanonzeroexitcodetoindicatefailure (null):Whilecheckingalphasin/Users/qianhaiyuan/Desktop/hy_mobile_ios/hy_Iphone/images/firstpage/log_reg_board.pngpngcrushcaughtlibpngerror: Command/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/copypngemittederrorsbutdidnotreturnanonzeroexitcodetoindicatefailure

以上就是xcode运行到真机报错 图片问题的全文介绍,希望对您学习和使用ios应用开发有所帮助.

上一篇下一篇

猜你喜欢

热点阅读