这两天在弄安卓相关,也就免不了与android-studio打交道.
在编译项目的过程中遇到了以下错误:
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/gradle-wrapper.properties中的
distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip
改为
distributionUrl=http\://services.gradle.org/distributions/gradle-3.3-all.zip
即可(即去掉一个s)
究其原因好像是gradle下载这个网站并没有https...
不得不说国内的环境对开发者太不友好了...
没有评论 T^T