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 a network connection timeout.)
Re-download dependencies and sync project (requires network)
Re-download dependencies and sync project (requires network)

当报这种错的时候

解决方案尝试:

1.乍一看,以为是没有网,保证网络连接后重新download,发现还是报同样的错。

 

2.既然说打开zip文件失败,那我查看gradle-wrapper.properties,那我去gradle目录找到项目依赖的4.10.1-all.zip,手动解压,提示压缩文件损坏

呐,找到问题点,删除现有的4.10.1-all.zip,保证网络状况,重新构建,问题解决

 

复盘:对as报的错没有深入分析,其实Error:Failed to open zip file. Gradle's dependency cache may be corrupt (this sometimes occurs after a network connection timeout.)的字面意思已经写的很清楚,可能因为下载gradle过程中,网络链接不稳定,导致gradle依赖的缓存损坏,导致zip无法被打开

错误:无法打开zip文件。Gradle的依赖缓存可能已损坏(这有时发生在网络连接超时之后。)

  • 6
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值