Could not install Gradle distribution from 'http://services.gradle.org/distributions/gradle-xx-all

若在導入他人工程是報此錯誤,請在build.gradle文件中將編譯版本修改爲自己新建工程的版本,如將下圖所示的1.3.0修改爲1.5.0

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:1.3.0'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        jcenter()
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

發佈了21 篇原創文章 · 獲贊 8 · 訪問量 4萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章