这是一个创建于 3097 天前的主题,其中的信息可能已经有所发展或是发生改变。
使用 aapt 手动编译 android 工程,怎么忽略.9 图片的报错?
ERROR: 9-patch image res/drawable-hdpi-v4/abc_ab_share_pack_mtrl_alpha.9.png malformed.
Must have one-pixel frame that is either transparent or white.
ERROR: Failure processing PNG image res/drawable-hdpi-v4/abc_ab_share_pack_mtrl_alpha.9.png
ERROR: 9-patch image res/drawable-mdpi-v4/abc_ab_share_pack_mtrl_alpha.9.png malformed.
Must have one-pixel frame that is either transparent or white.
ERROR: Failure processing PNG image res/drawable-mdpi-v4/abc_ab_share_pack_mtrl_alpha.9.png
ERROR: 9-patch image res/drawable-xhdpi-v4/abc_ab_share_pack_mtrl_alpha.9.png malformed.
Must have one-pixel frame that is either transparent or white.
ERROR: Failure processing PNG image res/drawable-xhdpi-v4/abc_ab_share_pack_mtrl_alpha.9.png
ERROR: 9-patch image res/drawable-xxhdpi-v4/abc_ab_share_pack_mtrl_alpha.9.png malformed.
Must have one-pixel frame that is either transparent or white.
ERROR: Failure processing PNG image res/drawable-xxhdpi-v4/abc_ab_share_pack_mtrl_alpha.9.png
ERROR: 9-patch image res/drawable-mdpi-v4/abc_btn_switch_to_on_mtrl_00001.9.png malformed.
No marked region found along edge.
ERROR: 9-patch image res/drawable-hdpi-v4/abc_btn_switch_to_on_mtrl_00001.9.png malformed.
No marked region found along edge.
Found along top edge.
4 条回复 • 2016-07-04 10:27:41 +08:00
|
|
1
abbenyyy 2016-07-04 09:55:40 +08:00
我说一下我把公司的老项目从 eclipse 转 AS 出现这错误的处理经验:报错是因为你那些.9 图缺少伸缩的点,好像要 4 个边都要有,你在 AS 打开报错的.9 图然后每个边都点几下,就可以了。当然可能会出现图片变形的问题,具体你和 UI 再商量协调。
|
|
|
2
linus 2016-07-04 10:12:08 +08:00
@ abbenyyy 那我把.9 图 后缀全部改成 png ,会影响 APP 本身的运行吗?
|
|
|
3
abbenyyy 2016-07-04 10:18:56 +08:00
@ linus 会,这时候 aapt 会报错,告诉你这张图片不是严格意义上的 png 图
|