0

There is an issue when building a project with google services included. I added the following google services classpath to the root build.gradle file:

dependencies {
    classpath 'com.android.tools.build:gradle:2.3.3'
    classpath 'com.google.gms:google-services:3.1.0'
}

and the project starts to complain with the following error when compiled:

Some file crunching failed, see logs for details

Error:Execution failed for task ':app:mergeDebugResources'.

Error: Some file crunching failed, see logs for details

I checked the logs for the IDE, but there seems to be no issue there. How do I fix this so that I could include google services in my project?

Khaimeng
  • 47
  • 10

1 Answers1

1

In this SO post, same error was encountered.

If you have .9.png files, try to remove them and test. In this post the user has many 9 patch images which is a possible reason of crunching problem.

Another thing is to add the code below to your build.gradle file.

 android {
    aaptOptions {  
       cruncherEnabled = false  
    } 
 }

By doing this, you will be able to exposed the incorrect references and files with issues that needed some fix. Before rebuild, don't forget to clear cache.

MαπμQμαπkγVπ.0
  • 5,887
  • 1
  • 27
  • 65
  • Thanks for the info. It was really an issue about image files. Is it because the images were too big, which led the IDE failed to compile? – Khaimeng Sep 12 '17 at 00:52