And: adle sync failed: C:\Users\zengjx\.gradle\caches\4.1\scripts-remapped\settings_7fgyzn9rget3mz
阿新 • • 發佈:2018-11-12
Gradle sync failed: C:\Users\zengjx\.gradle\caches\4.1\scripts-remapped\settings_7fgyzn9rget3mzt1mykfto9jk\75m1ojola3xee6bl95bu05hjo\settings4dada6424967ba8dfea75e81c8880f7f\cache.properties (系統找不到指定的檔案。)
Consult IDE log for more details (Help | Show Log) (619ms)
解決方法:在此目錄下 建立cache.properties 檔案 重新 clean Project ,rebuild Project .
Android Studio下,gradle project sync failed 錯誤
解決方案:進入專案目錄下,找到 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,問題解決
或者 修改成 4.6 版本:
#Thu Nov 08 09:48:06 CST 2018 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip
結果:編譯成功