Gradle's dependency cache may be corrupt 解决办法

电脑环境:windows 10
Android Stuido 版本2.3.1

今天 Android Stuido遇到下面这个问题

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)

后通过下面的方法解决掉问题:
具体参考:
http://stackoverflow.com/questions/38442901/gradles-dependency-cache-may-be-corrupt-this-sometimes-occurs-after-a-network

具体流程如下,其实看上面链接即可:

down vote
Watch the Tutorial https://www.youtube.com/watch?v=u92_73vfA8M

or

follow steps :

Go to any browser
type gradle and press enter
you can specify any version you want after the

gradle keyword

i am downloading gradle 3.3

https://services.gradle.org/distributions click on this link which is in description directly if you want
click on gradle 3.3 all.zip
wait for the download to complete
once the download is complete extract the file to the location
c://user/your pc name /.gradle/wrapper/dists

wait till extraction it takes 5 mins to complete
Now open your project in android studio
9.go to file > settings >bulid ,exec,deployment > gradle

now change use default gradle to
use local gradle distributn

select the location where you had extracted gradle 3.3.zip

C:\Users\your pc name.gradle\wrapper\dists\gradle-3.3

click on OK
Now build starts again and
you can see now the build is successful and error is resolved

2017年4月16日

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值