gradle project sync failed 錯誤

Android studio下突然報錯

gradle project sync failed.Basic functionality(e.g.editing,debugging) will not work properly.

解決方案:進入項目目錄下,找到 gradle\wrapper\gradle-wrapper.properties 文件,記事本打開,內容如下:

`#Sun Sep 04 23:25:42 CST 2016

distributionBase=GRADLE_USER_HOME

distributionPath=wrapper/dists

zipStoreBase=GRADLE_USER_HOME

zipStorePath=wrapper/dists

distributionUrl=https://services.gradle.org/distributions/gradle-2.14.1-all.zip

最後一句,https://services.gradle.org/distributions/gradle-2.14.1-all.zip

studio會下載上面的Gradle,不知道什麼原因下載不下來,我們可以手動下載這個版本的Gradle,無需解壓直接拷貝到

C:\Users\Administrator\.gradle\wrapper\dists\gradle-2.10-all\a4w5fzrkeut1ox71xslb49gst

下即可,重啟studio,問題解決

gradle各版本下載地址:https://services.gradle.org/distributions

You May Also Like