Gradle sync failed: Could not run build action using Gradle distribution 'xxxxxx

Android Studio構建時出現下面的錯誤

Gradle sync failed: Could not run build action using Gradle distribution 'xxxxxx/gradle-2.14.1-all.zip'.複製代碼

解決方法

  1. 訪問https://services.gradle.org/distributions/找到咱們所要的版本
  2. 而後在文件上點右鍵複製連接
  3. 打開咱們項目中gradle/wrapper/gradle-wrapper.properties文件
  4. 修改distributionUrl爲複製的連接
  5. 從新build項目,會從咱們設置的url下載gradle-xxx-all.zip

例如:bash

#Mon Dec 28 10:00:20 PST 2015
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複製代碼
相關文章
相關標籤/搜索