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

来源:互联网 发布:淘宝网卖家中心登录 编辑:程序博客网 时间:2024/05/08 10:44

电脑环境: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 voteWatch the Tutorial https://www.youtube.com/watch?v=u92_73vfA8Morfollow steps :Go to any browsertype gradle and press enteryou can specify any version you want after thegradle keywordi am downloading gradle 3.3https://services.gradle.org/distributions click on this link which is in description directly if you wantclick on gradle 3.3 all.zipwait for the download to completeonce the download is complete extract the file to the locationc://user/your pc name /.gradle/wrapper/distswait till extraction it takes 5 mins to completeNow open your project in android studio9.go to file > settings >bulid ,exec,deployment > gradlenow change use default gradle touse local gradle distributnselect the location where you had extracted gradle 3.3.zipC:\Users\your pc name.gradle\wrapper\dists\gradle-3.3click on OKNow build starts again andyou can see now the build is successful and error is resolved

2017年4月16日

0 2