1

I update my android studio to latest version 2.2.2 and Gradle version 1.4.1

But from the version 2.2 when I upgrade my all project to this one.

I always get this error in new version of Android studio, but all projects was working perfectly in previous version of android studio.

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, see logs for details

How can I disable or remove this check permanently ?

Jayesh
  • 3,661
  • 10
  • 46
  • 76
  • 1
    these are caused by some bad png files in your project. You have to identify it and remove it from your project – Vivek Mishra Nov 05 '16 at 06:22
  • project was working fine in previous android studio version and also sometime it is working in current android studio version 2.2.2. I want to disable crunching check in my all project. – Jayesh Nov 05 '16 at 06:24

1 Answers1

3

try adding this to build.gradle file

android{

    aaptOptions {  
        cruncherEnabled = false  
    } 
}

Note : it's not really a good idea to disable it because you will end up in increasing the apk size (in most cases) because you are disabling the image size optimization by doing this though i still recommend to open bad images in some image editor and use save as with .png format

Pavneet_Singh
  • 36,884
  • 5
  • 53
  • 68
  • 1
    Well you are right, but in some situation I need to disable cruncher. – Jayesh Nov 08 '16 at 05:19
  • @Jayesh in case if there are lot of images and you wanna find out the problematic image then you can try the command in [this answer](http://stackoverflow.com/questions/36495978/some-file-crunching-failed-see-logs-for-details/36498031) here , hopefully help – Pavneet_Singh Nov 08 '16 at 06:13