【问题标题】:failed to open zip file gradle dependency cache may be corrupt无法打开 zip 文件 gradle 依赖项缓存可能已损坏
【发布时间】:2023-03-20 11:28:01
【问题描述】:

当我更新 android studio 时出现此错误。创建一个新项目没有问题。我无法构建我现有的项目。

我正在上网,当我点击重新下载时,这个错误没有解决。 我该如何解决这个问题?我尝试了许多在互联网上找到的方法,但没有运气。

dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:25.0.1'
compile 'cz.msebera.android:httpclient:4.4.1.1'
compile 'com.mcxiaoke.volley:library:1.0.18'
compile 'com.squareup.okhttp3:okhttp:3.4.1'
compile 'com.github.florent37:materialtextfield:1.0.5'
compile 'com.googlecode.json-simple:json-simple:1.1'
compile 'com.android.support.constraint:constraint-layout:1.0.0-beta4'
compile 'com.rengwuxian.materialedittext:library:2.1.4'
compile 'de.hdodenhof:circleimageview:2.1.0'
compile 'com.github.PhilJay:MPAndroidChart:v3.0.1'
compile 'com.github.sundeepk:compact-calendar-view:1.9.8'
compile 'com.github.bumptech.glide:glide:3.7.0'
}

【问题讨论】:

    标签: android android-studio


    【解决方案1】:

    从项目目录中删除gradle 中的wrapper 文件夹。

    【讨论】:

      【解决方案2】:

      以 gradle-3.3 为例

      首先:删除~/.gradle/wrapper/dists/gradle-3.3-all/55gk2rcmfc6p2dg9u9ohc3hw9/gradle-3.3-all.zip中的gradle.zip

      第二种:从项目目录中删除gradle中的wrapper文件夹。

      Final:重新同步项目中的 gradle 文件。

      【讨论】:

        猜你喜欢
        • 2017-07-27
        • 1970-01-01
        • 2015-12-04
        • 2017-07-26
        • 1970-01-01
        • 1970-01-01
        • 2017-07-25
        • 1970-01-01
        • 2016-10-27
        相关资源
        最近更新 更多