首页 > 移动平台 > 详细

Ant 打包Android项目 libpng error: Not a PNG file

时间:2014-12-25 02:11:00      阅读:475      评论:0      收藏:0      [点我收藏+]
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

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!