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路径。

Android初学:Gradle 'HelloWorld' project refresh failed

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

Android初学:Gradle 'HelloWorld' project refresh failed
再按照方法二来选择这个目录,就行了。
上一篇:数据库索引B-树和B+树


下一篇:[c#]asp.net开发微信公众平台(7)前6篇的整体框架demo源码