Error:Execution failed for task ':app:mergeDebugResources'. > Crunching Cruncher bg_btn.9.png
来源:互联网 发布:macbook 下载软件 编辑:程序博客网 时间:2024/06/05 08:58
使用Android Studio来进行图片背景设置,编译时发生了一个mergeDebugResources异常。
异常原因
- 这个异常的意思是对资源合并发生错误,那就是我使用的图片资源有问题,我使用的图片是能在android环境自适应展示的.9.png格式,在Eclipse上使用是能通过编译的,但是为什么在android studio上就不能呢?
- 原来,android studio中的资源文件命名是不能带有数字的,因为会与R类的资源ID起冲突,所以编译就发生了错误。
解决方式
- 方式一:只需重新命名图片即可,在Make Project一下编译就能通过了。
方式二:我们可以用代码去除掉android studio对png格式文件的检测,这样系统就不会检测png格式的资源文件了。
找到app->build.gradle文件并打开,在buildToolsVersion属性下添加如下代码
aaptOptions.cruncherEnabled = falseaaptOptions.useNewCruncher = false修改完成再Make Project一下就不会报错了。
0 0
- 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
- 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
- Execution failed for task 'app:mergeDebugResources' Crunching Cruncher…png failed
- .9图片报错Execution failed for task ':app:mergeDebugResources'. > Crunching Cruncher scrollbar_thumb.9.p
- android Error:Execution failed for task 'xxxxx:mergeDebugResources'. > Crunching Cruncher ic
- Error:Execution failed for task ':ProjectName:mergeDebugResources'. > Crunching Cruncher *some file*
- Error:Execution failed for task ':app:mergeDebugResources'. > Error: Some file crunching failed
- Error:Execution failed for task ':app:mergeDebugResources'. > Error: Some file crunching failed, see
- Error:Execution failed for task ':app:mergeDebugResources'. > Error: Some file crunching failed, see
- Error:Execution failed for task ':app:mergeDebugResources'. > Error: Some file crunching failed, see
- Error:Execution failed for task ':app:mergeDebugResources'. > Some file crunching failed, see logs f
- android Error:Execution failed for task ':app:mergeDebugResources'. > Some file crunching failed, se
- Error:Execution failed for task ':app:mergeDebugResources'. > Some file crunching failed, see logs f
- Error:Execution failed for task :app:mergeDebugResources>Some file crunching failed的根本解决方法
- Error:Execution failed for task ':app:mergeDebugResources'. > Some file crunching failed, see logs
- Error:Execution failed for task ':app:mergeDebugResources'. > Some file crunching failed, see logs f
- PHP微信支付 支付结果通用通知获取不到数据的问题
- ecshop价格范围区间用户自定义选择价格代码
- IOS-Rtmp视频播放
- LeetCode笔记:392. Is Subsequence
- 安卓使用Picasso封装图片加载工具类
- Error:Execution failed for task ':app:mergeDebugResources'. > Crunching Cruncher bg_btn.9.png
- 任务
- python矩阵运算
- 5.2 Tomcat学习(servlet容器---Context)
- Java内部类详解
- C++时间与字符串转换
- Leetcode 451. Sort Characters By Frequency 按频率对字符排序 解题报告
- Java链接Mongodb
- 任务创建和删除