1. 程式人生 > >Failed to open zip file. Gradle's dependency cache may be corrupt (this sometimes occurs after a net

Failed to open zip file. Gradle's dependency cache may be corrupt (this sometimes occurs after a net

修改 gradle-wrapper.properties為檔案的,從其他工程複製一份就可以,一樣的專案自帶的就不可以,複製一份就可以,Mac版android Studio3.1版本

下面這段用第五行的就報錯,用第六行就可以。兩行程式碼用肉眼看明明是一樣的呀。

把其中任意一行程式碼執行Ctrl+H查詢,確只能找到其中一行。

distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
#distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip android.useDeprecatedNdk=true