Error:Failed to open zip file.Gradle's dependency cache may be corrupt 【Mac系统 AS】
来源:互联网 发布:网易闪电邮 for mac 编辑:程序博客网 时间:2024/05/16 04:16
转载请注明出处:http://blog.csdn.net/yudbl/article/details/78581508
To take advantage of all the latest features (such as Instant Run), improvements and security fixes, we strongly recommend that you update the Android Gradle plugin to version 3.0.0 and Gradle to version 4.1. You can learn more about this version of the plugin from the release notes.
最近手“不听使唤”,AS提示更新就点啦,结果等了好久,因公司的网不敢恭维就断开了,后来重新开启项目工程时,出现如下提示:
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)
估计是文件没更新完或损坏的原因
实践解决方式:
方式1:
(1) AS项目中找到文件:build.gradle(Project: xx项目名)
把以前项目的classpath复制过来
(2)AS项目中找到文件:gradle-wrapper.properties
把以前项目的 distributionUrl复制过来
方式2:
因为我有强迫症,既然更新了,我就想用最新的版本,于是尝试成功了此种方式。
AS的菜单栏,点击Android Studio,Preferences, Grade
搜索找到Gradle,点击标注的图标【或 复制路径“/Users/luminal/.gradle”,回到桌面 command+shift +G搜索找到】
把目录下最近更新的gradle删除
AS项目中找到文件:gradle-wrapper.properties,
拷贝链接放浏览器上:services.gradle.org/distributions/gradle-4.1-all.zip
即可下载,当然你也可以去网络上搜索下载。下载其他版本更改版本号就行啦,
如:services.gradle.org/distributions/gradle-3.3-all.zip
把下载下来的zip包,拷贝到如上图wrapper/dists 目录下
然后重启AS,AS会自己解压刷新等,就OK啦(建议还是选择网络好点的地方)
- Error:Failed to open zip file.Gradle's dependency cache may be corrupt 【Mac系统 AS】
- As导入新项目 Error:Failed to open zip file. Gradle's dependency cache may be corrupt ...
- Gradle 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
- 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
- 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
- AndroidStudio 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
- [Android]Error:Failed to open zip file.Gradle's dependency cache may be corrupt.
- Android studio2.3更新以后Error:Failed to open zip file. Gradle's dependency cache may be corrupt (this s
- Failed to open zip file. Gradle's dependency cache may be corrupt
- MacOS 显示隐藏文件
- 系统工程中的需求管理(一)
- Android Studio中ButterKnife的使用
- 用房地产数据可视化分析软件实现智慧人居
- LIS--最长不下降子序列
- Error:Failed to open zip file.Gradle's dependency cache may be corrupt 【Mac系统 AS】
- java连接HDFS+Kerberos配置参数示例
- spark学习-33-Spark的SerializerManager序列化管理器
- 算法—直接插入排序
- Eclipse打开报错:failed to load the jni shared library
- 关于助力砍价及微信公众号评论刷点赞及精选文章留言评论区点赞刷赞方法
- Oracle表空间管理
- leetcode: 71. Simplify Path
- python糗事百科爬虫