Error: java.lang.RuntimeException: Crunching Cruncher xxx.9.png failed,
来源:互联网 发布:哈佛大学学术地位知乎 编辑:程序博客网 时间:2024/05/29 16:07
在Eclipse中能正常运行的项目导入到Android Studio 中,出现了xxx.9.png 格式图片的报错:
Error:Execution failed for task ':app:mergeDebugResources'.> Error: java.lang.RuntimeException: Crunching Cruncher xxx.9.png failed, see logs
ok;我们来看看这句话的表面的释义:
Crunching Cruncher:Crunching 嘎吱作响; Cruncher 数字计算器;
总结就是:在程序运行的时候;计算机处理的过程中嘎吱、嘎吱作响,也就是这个处理过程中出现问题了;处理不了。那么 就是这个图片的原因了。
存在的原因一般是:
- 自加后缀的9妹图:有可能这个图片本身只是一个很普通的图片(不是正规的xxx.9.png图),程序员在使用的时候直接添加了.9.png 的后缀 导致;
- 不是标准的9妹图:这是经过处理生成的一个.9.png图;但是处理的不是很规范所以生成的不标准。
- 切记注意:.9.png图片只能放在 drawable 文件中、而不能放在mipmap文件中。
解决方式:
- 在 AndroidStudio 的主项目bulid.gradle 中的{andorid … }中添加:
android{aaptOptions{ cruncherEnabled = false useNewCruncher = false }}
- 若果上述的方式没有效果的话;让美工给设计一个规范的.9.png图使用; 或者就要自己动手试试调整一下.9.png图了:下面是自己通过动手调整 9妹图。
手动制作.9.png
1:通过强大的PS肯定是可以的;但是 有 些大材小用了或者说是 太隆重了,也没有这个必要。
2:通过AndoridStudio 的自带工具处理:打开文件 andorid –>sdk文件夹–>中的tools文件夹–>draw9patch.bat ;把要制作的图片拖动到这个里面就可以开始制作了;制作后是:File–Save 9-patch… 保存 (制作好的如下图周围没有红线了为好:)
3:直接在Andorid Studio 项目中操作 :在项目中打开 .9.png图片:
A:可以看出,9.png图片四周有黑色的线条。出现问题的9.png图片4条黑线是显示不全的,在AS中打开图片后,拉伸这四条线,让黑线都显示出来。
B:然后关闭图片,Clean 项目 重启,如果出现图片显示异常的情况,是黑线的位置没有调好,那就接着重新调整。
具体的 制作.9图片 的详细方式 度娘上应该很多很多; 如果还是不明白请自行科普了。
0 0
- Error: java.lang.RuntimeException: Crunching Cruncher xxx.9.png failed,
- Error:java.lang.RuntimeException: Crunching Cruncher XXX.9.png failed, see logs
- eclipse转Android Studio出现: Error:java.lang.RuntimeException: Crunching Cruncher xxx.9.png failed
- Error:java.lang.RuntimeException: Crunching Cruncher dialog_et_bg.9.png failed, see logs
- Error:java.lang.RuntimeException: Crunching Cruncher dialog_et_bg.9.png failed, see logs
- .9图片处理报错Error: java.lang.RuntimeException: Crunching Cruncher ic_coupon2.9.png failed, see logs
- Error:Execution failed for task ':app:mergeDebugResources'. > Crunching Cruncher bg_btn.9.png
- Error:Execution failed for task ':app:mergeDebugResources'. > Crunching Cruncher night_pop_bg.9.png
- Error:Execution failed for task ':app:mergeDebugResources'. > Crunching Cruncher bg_btn.9.png
- Error:Execution failed for task ':app:mergeDebugResources'. > Crunching Cruncher bg_btn.9.png
- 报错:Crunching Cruncher search_bar_edit_pressed.9.png failed, see logs
- Crunching Cruncher xx.png failed, see logs
- Crunching Cruncher send_music_thumb_backup.png failed, see logs
- Error:java.lang.RuntimeException: Some file crunching failed, see logs for detail
- Error:java.lang.RuntimeException: Some file crunching failed, see logs for details
- Error:java.lang.RuntimeException: Some file crunching failed, see logs for details
- Error:java.lang.RuntimeException: Some file crunching failed, see logs for details
- Error:java.lang.RuntimeException: Some file crunching failed, see logs for details
- 由View点击和长按同时存在导致冲突看View的事件分发
- MyBatis之 mapper代理方式
- asp.net 身份验证
- struts action的动态创建
- ubuntu 16.04LTS 下CodeBlocks16.01版
- Error: java.lang.RuntimeException: Crunching Cruncher xxx.9.png failed,
- eclipse android 签名(key)
- 使用Jenkins生成 二维码
- Windows下mysql的一些问题
- C语言邻接矩阵的实现
- 解决GitHub中灰色文件夹问题
- 时间飞逝,转眼已经快两年没更新博客了!
- 跳转指令
- 欢迎使用CSDN-markdown编辑器