android - 错误 :Failed to open zip file. Gradle 依赖项缓存可能已损坏(这有时会在网络连接超时后发生。)

标签 android android-studio android-gradle-plugin

Error:Failed to open zip file. Gradle dependency cache may be corrupt (this sometimes occurs after a network connection timeout.)

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    compile 'com.parse.bolts:bolts-android:1.+'
    compile 'com.parse:parse-android:1.+'
    compile 'com.android.support:appcompat-v7:23.2.0'
    compile 'com.android.support:recyclerview-v7:23.2.0'
    compile 'com.facebook.android:facebook-android-sdk:4.0.0'
    compile 'com.android.support:design:23.2.0'
    compile 'com.android.support:support-v4:23.2.0'
}

最佳答案

当我将 android studio 从 2.1 更新到 2.2.3 时,我遇到了同样的问题。折腾了一阵子,进入project->右键->open module settings->project

1) Gradle :2.14.1
2) 安卓插件版本:2.2.3
3) 安卓插件库:jcenter
4)默认库存储库:jcenter

关于android - 错误 :Failed to open zip file. Gradle 依赖项缓存可能已损坏(这有时会在网络连接超时后发生。),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41789809/

相关文章:

android - 我可以为 CI 和 Android Studio 设置单独的 gradle.properties 吗?

android - 如何动态更改TextView的背景颜色

ubuntu - 在 ubuntu 15.04 上安装 android studio 期间无法运行 mksdcard 工具

android - 在 build.gradle 文件的 externalNativeBuild 中指定目标-> 没有方法签名

android - 更新 SDK 后,Pixel 启动器一直停止

java - Gradle(Android)-testCompile中缺少多项目依赖项

android - 如何在自定义 ListView 上放置图像

android - Jenkins Lint 插件没有获取结果

android - Firebase - 是否有 API 可以在 firebase 上运行清理脚本

android - 无法解析 : exifinterface