Android Studio下,gradle project sync failed 錯誤

Android studio下忽然報錯app

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

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

`#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.zipdebug

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

我遇到兩種狀況,第一種 文本中網址有誤。如:
distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip
(多了個 \)get

第二種 網址正常,studio會下載上面的Gradle,不知道什麼緣由下載不下來,咱們能夠手動下載這個版本的Gradle,無需解壓直接拷貝到it

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

相關文章
相關標籤/搜索