Gradle Build Error - Failed to Unzip

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

The error is listed 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. 

Please help me fix this error.

+8
android android-gradle
source share
2 answers

You need to clear the build cache. Choose View> Tool> Terminal in the menu bar and use one of the following commands:

On Windows: gradlew cleanBuildCache

+3
source share

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

You need to do only in the terminal (for the terminal: select "View"> "Service"> "Terminal"):

On Windows:

 gradlew cleanBuildCache 

On Mac or Linux:

 ./gradlew cleanBuildCache 

And build a gradle

+3
source share

All Articles