1. 程式人生 > >Gradle's dependency cache may be corrupt (this sometimes occurs after a network connection timeout.)

Gradle's dependency cache may be corrupt (this sometimes occurs after a network connection timeout.)

Android Studio 匯入專案的時候出現的問題,有時候,還真的是莫名其妙。

這裡寫圖片描述

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>

解決辦法:

File-> Setting->Build,Execution,Deployment->Gradle-> Project-level setting,選擇Use local gradle distribution ,Ok一下,最後rebuild 專案。

這裡寫圖片描述