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下載進官網就行)版本,

 

 


再按照方法二來選擇這個目錄,就行了。

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM