我正在使用android studio进行一个项目。最近它显示错误your SDK is missing or out of date
所以,我再次下载了SDK。现在它显示错误Gradle Build failed
错误如下所述:
`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.
请帮我解决此错误。
答案 0 :(得分:3)
您需要清除构建缓存。 选择查看>工具窗口>从菜单栏终端并使用以下命令之一:
在Windows上: gradlew cleanBuildCache
答案 1 :(得分:3)
我有同样的问题, 答案是:https://developer.android.com/studio/build/build-cache.html?utm_source=android-studio#clear_the_build_cache
您只需在终端中进行操作(有终端:选择查看>工具窗口>终端):
在Windows上:
gradlew cleanBuildCache
在Mac或Linux上:
./gradlew cleanBuildCache
构建Gradle