无法打开zip文件gradle依赖缓存可能已损坏

时间:2017-03-06 07:58:59

标签: android android-studio

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

Showing error

我正在使用互联网,当我点击重新下载时,此错误无法修复。 我该如何解决这个问题?我试过在互联网上找到很多方法,但没有运气。

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'
}

2 个答案:

答案 0 :(得分:5)

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

答案 1 :(得分:2)

使用gradle-3.3例如

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

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

最终:项目中的resync gradle文件。

相关问题