当前位置:   article > 正文

Mac下解决AS出现Failed to open zip file. Gradle‘s dependency cache may be corrupt问题_mac gradle's dependency cache seems to be corrupt

mac gradle's dependency cache seems to be corrupt or out of sync.

导入项目报错如下:

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的zip包不全,从gradle下查看当前项目的gradle版本是2.14.1。
geadle版本

到系统gradle目录下查看对应版本的安装包果然和其他版本gradle不一样,不用自己去官网下替换,直接在目录下删掉错误的gradle包,回到项目中Rebuild一下重新下载对应版本的gradle就好了。

gradle安装目录一般在个人用户下User/xxx/.gradle/wrapper/dists/gradle-2.14.1-all
gradle目录

或者在AS配置下查看当前电脑的gradle安装目录
查看本机

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/我家自动化/article/detail/253128
推荐阅读
相关标签
  

闽ICP备14008679号