`
houniao1990
  • 浏览: 13437 次
  • 性别: Icon_minigender_1
  • 来自: 广州
社区版块
存档分类
最新评论

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

阅读更多
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无法打开。
解决方法就简单了,只需重新更新这两张图片。。
0
0
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics