Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Gradle build failed - unable to unzip

I am doing a project using android studio.Recently it showed an error that your SDK is missing or out of date so, I downloaded SDK once again.Now it shows an error that Gradle Build failed

The error is mentioned below:

`Error:Execution failed for task ':app:prepareComAndroidSupportAnimatedVectorDrawable2531Library'.
> Unable to unzip '/home/nandha/Android/Sdk/extras/android/m2repository/com/android/support/animated-vector-drawable/25.3.1/animated-vector-drawable-25.3.1.aar' to '/home/nandha/.android/build-cache/e07f150905e44f35b3635185e8f46be2d475fc86/output' or find the cached output '/home/nandha/.android/build-cache/e07f150905e44f35b3635185e8f46be2d475fc86/output' using the build cache at '/home/nandha/.android/build-cache'.
  To troubleshoot the issue or learn how to disable the build cache, go to https://d.android.com/r/tools/build-cache.html.
  If you are unable to fix the issue, please file a bug at https://d.android.com/studio/report-bugs.html.

Kindly help me to fix this error.

like image 568
nandha kumar Avatar asked May 13 '17 07:05

nandha kumar


2 Answers

You need the clear the build cache. Select View > Tool Windows > Terminal from the menu bar and use one of the following commands:

On Windows: gradlew cleanBuildCache

like image 137
Karishma Verma Avatar answered Nov 09 '22 07:11

Karishma Verma


I had the same problem, The answer is there : https://developer.android.com/studio/build/build-cache.html?utm_source=android-studio#clear_the_build_cache

You have just to do in a Terminal (for have terminal : Select View > Tool Windows > Terminal) :

On Windows:

gradlew cleanBuildCache

On Mac or Linux:

./gradlew cleanBuildCache

And build Gradle

like image 33
Brice Gay Avatar answered Nov 09 '22 07:11

Brice Gay