用 Ant 打包Android项目时 ,因资源文件中包含.9.png 报错

Buildfile: E:\workspace\eclipse_370\mycc\build.xml
generateAPK:
init:
  [echo] Initializing all output directories...
gen-R:
  [echo] Generating R.java from the resources...
  [exec] ERROR: 9-patch image res\drawable-hdpi\bg_button1.9.png malformed.
  [exec] Frame pixels must be either solid or transparent (not intermediate alphas).
  [exec] Found at pixel #2 along bottom edge.
  [exec] ERROR: Failure processing PNG image res\drawable-hdpi\bg_button1.9.png
  [exec] res\layout\main.xml:12: error: Error: No resource found that matches the given name (at 'background' with value '@drawable/bg_about_btn').

BUILD FAILED
E:\workspace\eclipse_370\mycc\build.xml:227: The following error occurred while executing this line:
E:\workspace\eclipse_370\mycc\build.xml:106: exec returned: 1


Total time: 1 second

用9图工具打开重新保存,应该就可以了  未验证

你可能感兴趣的:(Android)