Jayesh Jayesh - 1 month ago 55
Android Question

How to permanently remove file crunching error in android studio?

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 ?

Answer

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