1
votes

How to solve the error "failed to crunch file"

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

Error: Failed to crunch file FinalProject\app\build\intermediates\exploded-aar\com.google.android.gms\play-services-base\10.2.1\res\drawable-xxhdpi-v4\common_google_signin_btn_icon_light_normal_background.9.png into FinalProject\app\build\intermediates\res\merged\debug\drawable-xxhdpi-v4\common_google_signin_btn_icon_light_normal_background.9.png

2
Check your Gradle VersionMansi Bhatt
its 2.2.3 @Mansi BhattRavi Vaniya
So, please rebuild first and clean your projectMansi Bhatt
not working , whenever i tries to rebuild same error occureRavi Vaniya
ok than Copy the directory one level above and try it may be it's the issue with long path of directory.Mansi Bhatt

2 Answers

0
votes

I had exactly the same error, when I was using the google plus plugin. I tried to move the project to a smaller path and it worked.

Searching a bit more about it, it seems that Google has a 240 characters size limitation to the path. Another possible solution, is to add to your platforms/android/build.gradle, inside allprojects, this line:

buildDir = "C:/tmp/${rootProject.name}/${project.name}"

Now your build file will be moved to a smaller path and the problem will disappear.

0
votes

Please change path of your project folder previous path have to long Example d:projects/tfs/demos/ionic/projects/project_Name to projects/project_name folder

or

by using "subst" command in command prompt like below

d:projects/tfs/demos/ionic/projects/project_Name folder :subst i: . it will make "i" drive in PC, "i" drive open your project and build it