Ant?打包Android项目 由于指定不用android sdk 工具自动生成的build.xml 文件,就自己网上搜了一堆资料, 写了个ant脚本,构建过程出现了一堆错误。下面是其中最让我郁闷的错误, [exec] libpng error: Not a PNG file [exec] ERROR: Failure processing PNG image res\drawable-hdpi\btn_bg_blue.png [exec] libpng error: Not a PNG file [exec] ERROR: Failure processing PNG image res\drawable-hdpi\splash.png [exec] res\layout\common_list_item2.xml:7: error: Error: No resource found that matches the given name (at ‘background‘ with value ‘@drawable/listitem_selector‘). [exec] res\layout\common_list_item2.xml:20: error: Error: No resource found that matches the given name (at ‘background‘ with value ‘@drawable/cancelbing_btn_selecter‘). .... (看到这个错误,理解错了方向,郁闷资源文件怎么没全部打包进去) 错误的原因是btn_bg_blue.png与splash.png这两张图片格式不正确。用ps无法打开。 解决方法就简单了,只需重新更新这两张图片。。
Ant 打包Android项目 libpng error: Not a PNG file
原文:http://houniao1990.iteye.com/blog/2169678