Gradle build failed - unable to unzip

♀尐吖头ヾ 提交于 2019-12-04 21:58:34

问题


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.


回答1:


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




回答2:


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



来源:https://stackoverflow.com/questions/43950483/gradle-build-failed-unable-to-unzip

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!