android用ant脚本集成编译过程中出现的9-patch image错误
2016-01-25 18:04
435 查看
[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打包即可。
相关文章推荐
- 使用C++实现JNI接口需要注意的事项
- Android IPC进程间通讯机制
- Android Manifest 用法
- [转载]Activity中ConfigChanges属性的用法
- Android之获取手机上的图片和视频缩略图thumbnails
- Android之使用Http协议实现文件上传功能
- Android学习笔记(二九):嵌入浏览器
- android string.xml文件中的整型和string型代替
- i-jetty环境搭配与编译
- android之定时器AlarmManager
- android wifi 无线调试
- Android Native 绘图方法
- Android java 与 javascript互访(相互调用)的方法例子
- android 代码实现控件之间的间距
- android FragmentPagerAdapter的“标准”配置
- Android"解决"onTouch和onClick的冲突问题
- android:installLocation简析
- android searchView的关闭事件
- SourceProvider.getJniDirectories