Error:Failed to open zip file. Gradle's dependency cache may be corrupt (this sometimes occurs after
2017-11-12 21:28
537 查看
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>
这是更新android的gradle版本后,导入老的工程遇到的问题。
出现这个问题的原因就是这个项目需要的依赖文件缺失,可以打开 /gradle/wrapper/gradle-wrapper.properties这个文件看distributionUrl这一行的是什么依赖,我项目是
distributionUrl=https\://services.gradle.org/distributions/gradle-2.4-all.zip
我去C:\Users\**(用户名)\.gradle\wrapper\dists\gradle-2.4-all\6r4uqcc6ovnq6ac6s0txzcpc0 下看了一下gradle-2.4-all.zip这个文件夹,发现这个文件夹缺失了文件。之所以会缺失是因为我本地其实并没有gradle-2.4-all这个文件夹,只是在导入项目时AS新建的,因此这个文件夹不完整,所以解决办法是:
在http://services.gradle.org/distributions/网址中下载gradle-2.4-all.zip,然后放到C:\Users\**(用户名)\.gradle\wrapper\dists\gradle-2.4-all\6r4uqcc6ovnq6ac6s0txzcpc0\下替换掉gradle-2.4-all.zip,然后重新编译就可以了。
相关文章推荐
- Error:Failed to open zip file. Gradle's dependency cache may be corrupt (this sometimes occurs after
- Error:Failed to open zip file. Gradle's dependency cache may be corrupt (this sometimes occurs after
- Error:Failed to open zip file. Gradle's dependency cache may be corrupt (this sometimes occurs after
- Error:Failed to open zip file. Gradle's dependency cache may be corrupt (this sometimes occurs after
- Error:Failed to open zip file. Gradle's dependency cache may be corrupt (this sometimes occurs after
- Error:Failed to open zip file. Gradle's dependency cache may be corrupt (this sometimes occurs after
- Error:Failed to open zip file. Gradle's dependency cache may be corrupt (this sometimes occurs after
- Error:Failed to open zip file. Gradle's dependency cache may be corrupt (this sometimes occurs after
- Error:Failed to open zip file. Gradle's dependency cache may be corrupt (this sometimes occurs after
- Error:Failed to open zip file. Gradle's dependency cache may be corrupt (this sometimes occurs afte
- [置顶] Android studio2.3更新以后Error:Failed to open zip file. Gradle's dependency cache may be corrupt (this s
- 解决错误Error:Failed to open zip file. Gradle's dependency cache may be corrupt
- studio编译错误Error:Failed to open zip file. Gradle's dependency cache may be corrupt
- 关于Android Studio出现Error:Failed to open zip file. Gradle's dependency cache may be corrupt 异常
- Error:Failed to open zip file. Gradle's dependency cache may be corrupt
- Error:Failed to open zip file. Gradle's dependency cache may be corrupt
- Error:Failed to open zip file. Gradle's dependency cache may be corrupt
- 关于Android Studio出现Error:Failed to open zip file. Gradle's dependency cache may be corrupt 异常
- Error:Failed to open zip file. Gradle's dependency cache may be corrupt
- Android studio2.3.1 更新以后Error:Failed to open zip file. Gradle's dependency cache may be corrupt