0
votes

I'm progressing through the Google Maps API tutorials for android and keep getting the following errors while trying to compile the code.
Note: I'm aware that there are numerous other questions with the same error, however, I have tried the answers posted on them (as stated below) and I'm unfortunately still no further forward.

Error:Failed to crunch file C:\googleMapsTutorial\android-samples-master\tutorials\CurrentPlaceDetailsOnMap\app\build\intermediates\exploded-aar\com.google.android.gms\play-services-cast-framework\10.0.1\res\drawable-mdpi-v4\quantum_ic_pause_circle_filled_grey600_36.png into C:\googleMapsTutorial\android-samples-master\tutorials\CurrentPlaceDetailsOnMap\app\build\intermediates\res\merged\debug\drawable-mdpi-v4\quantum_ic_pause_circle_filled_grey600_36.png Error:Execution failed for task ':app:mergeDebugResources'. Error: Failed to crunch file C:\googleMapsTutorial\android-samples-master\tutorials\CurrentPlaceDetailsOnMap\app\build\intermediates\exploded-aar\com.google.android.gms\play-services-cast-framework\10.0.1\res\drawable-mdpi-v4\quantum_ic_pause_circle_filled_grey600_36.png into C:\googleMapsTutorial\android-samples-master\tutorials\CurrentPlaceDetailsOnMap\app\build\intermediates\res\merged\debug\drawable-mdpi-v4\quantum_ic_pause_circle_filled_grey600_36.png

  • What I've Done:

I googled the error and saw an abundance of suggestions to move the project folder to the C drive to shorten the path length. As you can see, I've already done this and still appear to be getting the same issue. I've also attempted to re-save the file as the .png file in both the file destinations stated above, to no avail.

To clarify, all I've done is downloaded the zip file from "https://github.com/googlemaps/android-samples" and unzipped it into my C drive. I've then moved the specific tutorial (CurrentPlaceDetailsOnMap) into my C drive. Finally, I've added in my API key into the gradle.properties file saved and ran attempted to build the app.

If anyone has any suggestions/advice on how to get past the error above, i would be supper appreciative!

1

1 Answers

0
votes

This error will appear when your dirs is too long,please move your project to higher dir like c:/ or add this in your build.grade:

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

}