android - Gradle 构建失败 - 无法解压缩

标签 android android-gradle-plugin android-studio-2.2

我正在使用 android studio 做一个项目。最近它显示错误 your SDK is missing or out of date 所以,我再次下载了 SDK。现在它显示错误 Gradle 构建失败

错误如下:

`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.

请帮我解决这个错误。

最佳答案

您需要清除构建缓存。 从菜单栏中选择“查看”>“工具窗口”>“终端”,然后使用以下命令之一:

在 Windows 上: gradlew cleanBuildCache

关于android - Gradle 构建失败 - 无法解压缩,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43950483/

相关文章:

java - 如何使用 Django REST API 验证 android 用户 POST 请求?

android - Android Gradle重复文件复制异常

android - 如何从 .aar 文件中排除 .jar 文件

java - Gradle 编译依赖未添加到类路径

android - 在 Android Studio 的数据绑定(bind)库中找不到 setHandler 的符号方法

android - 如何对RecyclerView中的数据进行排序

Android 无法暂停 Activity 接收器未注册

java - 为什么 findViewById() 会导致 relativeLayout 初始化命令崩溃?

android - 无法在Android Studio中同步gradle 3.1项目:

java - 如何将 Jsoup 添加到我的 Android Studio 项目中?