Android初学:Gradle 'HelloWorld' project refresh failed

Gradle 'HelloWorld' project refresh failed

Error:Failed to open zip file.
Gradle's dependency cache may be corrupt (this sometimes occurs after a network connection timeout.)
<a href="syncProject">Re-download dependencies and sync project (requires network)</a>
<a href="syncProject">Re-download dependencies and sync project (requires network)</a>

出现这种情况时,

解决方法一: 清除缓存, 重启Gradle, File->Invalidate Caches / Restart... ; 即可;

解决方法二:file ->settings->Build Tools ->Gradle 进行如下红框里的设置,即指定本地android studio里的Gradle路径。

 

解决方法三:从新下载一份Grandle的 gradle-X.X-all.zip(百度搜gradle下载进官网就行)版本,

 

 


再按照方法二来选择这个目录,就行了。

 

posted @ 2018-01-24 15:23  广金  阅读(1328)  评论(0编辑  收藏  举报