2017-03-06 80 views
3

当我更新android studio时,出现此错误。创建一个新项目没有问题。我无法建立我现有的项目。未能打开zip文件gradle依赖关系缓存可能已损坏

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

回答

4

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

2

的gradle使用-3.3例如

第一:删除gradle.zip~/.gradle/wrapper/dists/gradle-3.3-all/55gk2rcmfc6p2dg9u9ohc3hw9/gradle-3.3-all.zip

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

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