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>
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>
编译错误解决方案:
打开文件gradle-wrapper.properties
distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip
找到之前可用工程,把这句替换掉就ok了
当然也可在C:\Users\gonglt1\.gradle\wrapper\dists 这个目录下看有的版本,替换掉就ok
本文介绍了解决Gradle项目中出现的依赖缓存错误的方法。通过替换gradle-wrapper.properties文件中的distributionUrl链接或者从已有版本中选择合适的Gradle版本进行替换,可以有效解决此问题。

2262

被折叠的 条评论
为什么被折叠?



