Skip to content
This repository has been archived by the owner on Aug 23, 2023. It is now read-only.

Failed to crunch file #57

Closed
francisrod01 opened this issue Sep 25, 2016 · 3 comments
Closed

Failed to crunch file #57

francisrod01 opened this issue Sep 25, 2016 · 3 comments

Comments

@francisrod01
Copy link

Hi there,
I have a problem with samplecode and google-play dependences and drawable icons.
Every time that I compile the project this error happens with icons:

Error: com.android.builder.internal.aapt.AaptException: Failed to crunch file 

C:\Users\Francis\Documents\projects\mobile\android-play-location\Geofencing\Application\build\intermediates\exploded-aar\com.google.android.gms\play-services-base\8.4.0\res\drawable-mdpi\common_google_signin_btn_text_dark_normal.9.png into 

C:\Users\Francis\Documents\projects\mobile\android-play-location\Geofencing\Application\build\intermediates\res\merged\debug\drawable-mdpi\common_google_signin_btn_text_dark_normal.9.png

The icons exists but I not run my project because of that.
What's going wrong?

@Alexsan
Copy link

Alexsan commented Oct 6, 2016

Try renaming the root folder into a shorter name: aplm/geofencing/application/...
Rebuild and run it again. See if that solves the problem.

Taken from this source: http://stackoverflow.com/questions/34477333/why-i-get-some-file-crunching-failed-after-i-rename-drawable-file-to-9-png

@francisrod01
Copy link
Author

Haha solved! :D
Thanks @Alexsan !

@artem-p
Copy link

artem-p commented Aug 29, 2017

Another solution that doesn't require to move the project is to change the build directory of the project in build.gradle:
allprojects { buildDir = "C:/tmp/${rootProject.name}/${project.name}" }

Taken from this https://stackoverflow.com/questions/41267005/failed-to-crunch-file-android-studio-appmergedebugresources

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants