android用ant脚本集成编译过程中出现的9-patch image错误

  [echo] packaging resource (include res, assets, AndroidManifest.xml, etc.) to res.zip ... 
     [exec]     (skipping file '.gitignore' due to ANDROID_AAPT_IGNORE pattern '.*')
     [exec] ERROR: 9-patch image .\res\drawable-hdpi\bangclepay_keyboard_letter_shift_normal.9.png malformed.
     [exec]        No marked region found along edge.
     [exec]        Found along top edge.
     [exec] ERROR: Failure processing PNG image .\res\drawable-hdpi\bangclepay_keyboard_letter_shift_normal.9.png
     [exec] ERROR: 9-patch image .\res\drawable-hdpi\bangclepay_keyboard_letter_shift_press.9.png malformed.
     [exec]        No marked region found along edge.
     [exec]        Found along top edge.
     [exec] ERROR: Failure processing PNG image .\res\drawable-hdpi\bangclepay_keyboard_letter_shift_press.9.png
     [exec] .\res\layout\activity_bank_bind_step1.xml:20: error: Error: No resource found that matches the given name (at 'src' with value '@drawable/icon_tip_info').
     [exec] .\res\layout\activity_bank_bind_step1.xml:52: error: Error: No resource found that matches the given name (at 'src' with value '@drawable/icon_bank_read').
     [exec] .\res\layout\activity_bank_bind_step1.xml:62: error: Error: No resource found that matches the given name (at 'background' with value '@drawable/btn_common_noclick').
     [exec] .\res\layout\activity_bank_bind_step2.xml:156: error: Error: No resource found that matches the given name (at 'button' with value '@drawable/btn_checkbox').
     [exec] .\res\layout\activity_bank_bind_step2.xml:175: error: Error: No resource found that matches the given name (at 'background' with value '@drawable/btn_common_noclick').
     [exec] .\res\layout\activity_bank_bind_step3.xml:23: error: Error: No resource found that matches the given name (at 'src' with value '@drawable/icon_tip_success').
     [exec] .\res\layout\activity_bank_listitem.xml:14: error: Error: No resource found that matches the given name (at 'background' with value '@drawable/bg_while_circle').
     [exec] .\res\layout\activity_bank_listitem.xml:14: error: Error: No resource found that matches the given name (at 'src' with value '@drawable/icon_bank_abc').
     [exec] .\res\layout\activity_bank_unbind.xml:26: error: Error: No resource found that matches the given name (at 'src' with value '@drawable/icon_tip_info').
     [exec] .\res\layout\activity_bank_unbind.xml:89: error: Error: No resource found that matches the given name (at 'background' with value '@drawable/btn_common_noclick').
     [exec] .\res\layout\activity_bind_phone.xml:34: error: Error: No resource found that matches the given name (at 'src' with value '@drawable/icon_tip_info').
     [exec] .\res\layout\activity_bind_phone.xml:84: error: Error: No resource found that matches the given name (at 'background' with value '@drawable/btn_grey_unable').
     [exec] .\res\layout\activity_buy_success.xml:20: error: Error: No resource found that matches the given name (at 'src' with value '@drawable/icon_buy_success_step1').
     [exec] .\res\layout\activity_buy_success.xml:102: error: Error: No resource found that matches the given name (at 'src' with value '@drawable/icon_buy_success_step3_gray').
     [exec] .\res\layout\activity_buy_success_jjt_jjy.xml:47: error: Error: No resource found that matches the given name (at 'src' with value '@drawable/icon_bank_abc').
     [exec] .\res\layout\activity_check_identification.xml:68: error: Error: No resource found that matches the given name (at 'background' with value '@drawable/btn_grey_unable').
     [exec] .\res\layout\activity_create_pattern.xml:2: error: Error: No resource found that matches the given name (at 'background' with value '@drawable/login_bg').
     [exec] .\res\layout\activity_create_pattern.xml:10: error: Error: No resource found that matches the given name (at 'src' with value '@drawable/icon_close').
     [exec] .\res\layout\activity_create_pattern.xml:38: error: Error: No resource found that matches the given name (at 'background' with value '@drawable/pattern_preview').
     [exec] .\res\layout\activity_create_pattern.xml:44: error: Error: No resource found that matches the given name (at 'background' with value '@drawable/pattern_preview').
     [exec] .\res\layout\activity_create_pattern.xml:51: error: Error: No resource found that matches the given name (at 'background' with value '@drawable/pattern_preview').
     [exec] .\res\layout\activity_create_pattern.xml:65: error: Error: No resource found that matches the given name (at 'background' with value '@drawable/pattern_preview').
     [exec] .\res\layout\activity_create_pattern.xml:71: error: Error: No resource found that matches the given name (at 'background' with value '@drawable/pattern_preview').
     [exec] .\res\layout\activity_create_pattern.xml:78: error: Error: No resource found that matches the given name (at 'background' with value '@drawable/pattern_preview').
     [exec] .\res\layout\activity_create_pattern.xml:92: error: Error: No resource found that matches the given name (at 'background' with value '@drawable/pattern_preview').
     [exec] .\res\layout\activity_create_pattern.xml:98: error: Error: No resource found that matches the given name (at 'background' with value '@drawable/pattern_preview').
     [exec] .\res\layout\activity_create_pattern.xml:105: error: Error: No resource found that matches the given name (at 'background' with value '@drawable/pattern_preview').
     [exec] .\res\layout\activity_face.xml:13: error: Error: No resource found that matches the given name (at 'src' with value '@drawable/main_camera_mask').
     [exec] .\res\layout\activity_face.xml:24: error: Error: No resource found that matches the given name (at 'src' with value '@drawable/main_head_mask').
     [exec] .\res\layout\activity_face.xml:31: error: Error: No resource found that matches the given name (at 'background' with value '@drawable/main_gradient_back').
     [exec] .\res\layout\activity_face.xml:36: error: Error: No resource found that matches the given name (at 'src' with value '@drawable/faceppinside').
     [exec] .\res\layout\activity_face.xml:50: error: Error: No resource found that matches the given name (at 'src' with value '@drawable/main_circle').
     [exec] .\res\layout\activity_face.xml:58: error: Error: No resource found that matches the given name (at 'background' with value '@drawable/main_start_timeout').
     [exec] .\res\layout\activity_face.xml:105: error: Error: No resource found that matches the given name (at 'src' with value '@drawable/main_bottom_tips').
     [exec] .\res\layout\activity_face.xml:137: error: Error: No resource found that matches the given name (at 'src' with value '@drawable/main_start').
 
 
经过网上查找资料

 
 
问题原因是工程中的资源文件xx.9.png的图片有问题,;
一般是因为你的项目中有些图片出了问题,ant解析不了。不一定就是错误日志中所显示的图片有问题(如xxx),也可能是其他的图片有问题。


解决方法:

1 可以让ui改下,或者自己动手改下;自己修改的话,则使用android sdk中的目录tools下的工具draw9patch.bat来在图片的边缘描绘下图片的边缘可以解决 

2 找出问题图片(推荐使用Photoshop将项目中所使用的图片进行一一打开,如Photoshop打开一图片时出错,则该图片肯定有问题),将该图片删除或替换成没问题的图片。再重新ant打包即可。
 
 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值