错误:无法打开zip文件。 Gradle的依赖缓存可能已损坏 [英] Error:Failed to open zip file. Gradle's dependency cache may be corrupt

查看:1415
本文介绍了错误:无法打开zip文件。 Gradle的依赖缓存可能已损坏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经更新了android studio 2.3,并且有一个bug,毕业从来没有建立它保持给我所有项目相同的错误

 错误:无法打开zip文件。 
Gradle的依赖缓存可能已损坏(有时会在网络连接超时后发生)
< a href =syncProject>重新下载依赖关系和同步项目(需要网络)< / a> ;
< a href =syncProject>重新下载依赖关系和同步项目(需要网络)< / a>

我已经搜索解决方案,但没有找到任何,我试过

 无效缓存/重新启动... 

但没有改变。

解决方案

我将Android Studio升级到2.3以后,我今天早上遇到同样的问题。
要解决问题:



1)手动下载Gradle 3.3二进制文件(直接链接: https://services.gradle.org/distributions/gradle-3.3-bin.zip



2)打开您的android studio根目录,并将zip解压缩到gradle文件夹(例如在我的Debian机器中,完整路径为/opt/android-studio/gradle/gradle-3.3)



3)打开Android Studio,转到File-> Settings-> Build,Exectution,Deployment-> Gradle并设置Gradle home指向新的gradle-3.3文件夹。 p>

4)同步,你准备好了!



我希望有帮助;)


I have been updated android studio 2.3 and there is a bug , gradle never build it keep give me the same error for all projects

Error:Failed to open zip file.
Gradle's dependency cache may be corrupt (this sometimes occurs after a network connection timeout.)
<a href="syncProject">Re-download dependencies and sync project (requires network)</a>
<a href="syncProject">Re-download dependencies and sync project (requires network)</a>

I already search for solution but not found any, I tried

Invalidate Caches / Restart...

but nothing change.

解决方案

I've faced the same issue this morning after upgrading Android Studio to 2.3. To solve the issue:

1) Manually download Gradle 3.3 binary (direct link: https://services.gradle.org/distributions/gradle-3.3-bin.zip)

2) Open your android studio root directory, and extract the zip to the gradle folder (for example in my Debian machine the full path is /opt/android-studio/gradle/gradle-3.3)

3) Open Android Studio, go to File->Settings->Build, Exectution, Deployment->Gradle and set "Gradle home" to point your new gradle-3.3 folder.

4) Sync and you are ready to go!

I hope that helps ;)

这篇关于错误:无法打开zip文件。 Gradle的依赖缓存可能已损坏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆