Error:Failed to open zip file.
Gradle's dependency cache may be corrupt (this sometimes occurs after a network connection timeout.)
Re-download dependencies and sync project (requires network)
Re-download dependencies and sync project (requires network)
错误如上。
最简单的方法,也是我采用的方法,就是改一下gradle-wrapper.properties中的distributionUrl
将
- distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip
改成
- distributionUrl=http\://services.gradle.org/distributions/gradle-3.3-all.zip

本文介绍了解决Gradle项目中出现的依赖缓存错误的方法。通过更改gradle-wrapper.properties文件中的distributionUrl属性,从https改为http,可以有效解决Gradle依赖下载失败的问题。
1914

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



