Android Gradle Build Error:Some file crunching failed, see logs for details解决办法

错误日志:Error:java.lang.RuntimeException: Some file crunching failed, see logs for details

Log:

  FAILURE: Build failed with an exception.

  * What went wrong:
  Execution failed for task ‘:app:mergeDebugResources‘.
  > Error: java.lang.RuntimeException: Crunching Cruncher ic_default_home_new.png failed, see logs

  * Try:
  Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

解决方法如下:

 1 android {
 2     compileSdkVersion 23
 3     buildToolsVersion "23.0.3"
 4
 5     aaptOptions {
 6         cruncherEnabled = false
 7         useNewCruncher = false
 8
 9     }
10     defaultConfig {
11         applicationId "com.security.browser.xinj"
12         minSdkVersion 15
13         targetSdkVersion 22
14         versionCode 2
15         versionName "1.0.1"
16         ndk {
17             //设置支持的SO库架构
18             abiFilters ‘armeabi‘, ‘x86‘, ‘armeabi-v7a‘, ‘x86_64‘, ‘arm64-v8a‘
19         }
20     }
21 }

出现这个错误的原因是构建Gradle的时候,Gradle会去检查一下是否修改过文件的后缀名,

一半大多数是出现在图片上,.jpg修改成了.png就会出现这个问题。

时间: 2024-10-11 05:57:13

Android Gradle Build Error:Some file crunching failed, see logs for details解决办法的相关文章

【转载】Android Gradle Build Error:Some file crunching failed, see logs for details解决办法

错误日志:Error:java.lang.RuntimeException: Some file crunching failed, see logs for details Log: FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':app:mergeDebugResources'. > Error: java.lang.RuntimeException: Crunch

Some file crunching failed, see logs for details 一种情形的解决办法

初学android开发,使用android studio,找了网上一个Demo学习学习,一番折腾之后终于排除了编码错误(编译之前就能检测到的错误). 打开模拟器,运行时,又发生若干错误,如图: 错误信息:Error:Some file crunching failed, see logs for details 一些文件处理失败,详情请看日志. 然后去看logcat,看看到底怎么回事,过滤器选择Error: 11-07 03:03:13.691 6290-6290/? E/memtrack: C

Android Studio 导入 Eclipse项目 报 Some file crunching failed, see logs for details

今天在用Android Studio 导入一个Eclipse的项目,报了如下错误: Error:java.lang.RuntimeException: Some file crunching failed, see logs for details Error:Execution failed for task ':app:mergeDebugResources'. > Error: java.lang.RuntimeException: Some file crunching failed,

Error:Execution failed for task ':app:mergeDebugResources'. > Some file crunching failed, see logs for details

Android Studio 编译中断.... Error:Execution failed for task ':app:mergeDebugResources'. > Some file crunching failed, see logs for details 错误信息如上: 解决方案: drawable里面的图片格式保存不对,Android studio 当编译资源文件的时候(using AAPT(Android Asset Packaging Tool))会抛出异常, 只需要用图片编

Android Studio 导入应用时报错 Error:java.lang.RuntimeException: Some file crunching failed, see logs for details

在app文件夹的build.gradle里加上 android { ...... aaptOptions.cruncherEnabled = false aaptOptions.useNewCruncher = false ...... }

Android_bug之 task ':app:mergeDebugResources'. > Some file crunching failed, see logs f

今天调试安卓程序遇到的问题Error:Execution failed for task ':app:mergeDebugResources'. > Some file crunching failed, see logs f 主要是图片格式的问题,图片要用png格式的,直接修改图片格式会报这个错误无法调适 以下转自:http://blog.csdn.net/nailsoul/article/details/50268291 错误代码 Error:Execution failed for tas

插入图片后R文件变红,报错“Error::app:mergeDebugResources'. > Some file crunching failed, see logs for detail”

本想做一个有爱的小东西,插入图片后发现原本之前运行成功的程序, 出现了报错“:app:mergeDebugResources'. > Some file crunching failed, see logs for detail” 一脸懵逼~~~这是什么鬼,在别人的回答和博客里找找解决办法. 不过对我好像不管用,找了好久才发现是图片的问题. 之前只是简单的在重命名的时候把图片改成“xx.png”,放在了app/src/main/res/drawable文件夹里(ps:目前每次我都是在复制图片再粘

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, see logs f 主要是图片格式的问题,图片要用png格式的,直接修改图片格式会报这个错误无法调适 Error:Execution failed for task ':app:mergeDebugResources'. > Some file crunching failed, see

Android DEV : Android Studio Build Error

    有段时间没打开Android Studio, 今天尝试编译个App却出现如下错误. Error:The SDK Build Tools revision (19.0.3) is too low for project ':app'. Minimum required is 19.1.0     折腾了一下, 发现原来是app的buildToolsVersion没有跟上Android SDK Build-Tools版本变化, 更新下app目录下的build .gradle中下面相应的值就好