Error:(6, 0) Gradle DSL method not found: 'google()'

将Projectd的build.gradle 中goole()去掉,添加

maven {
            url 'https://maven.google.com'
            name 'Google'
        }

例如:

buildscript {
    repositories {
       google()
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:2.3.2'
        classpath 'com.novoda:bintray-release:0.5.0'
    }
}

allprojects {
    repositories {
       google()
        jcenter()
        maven { url 'https://jitpack.io' }
    }
}

改成

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:2.3.2'
        classpath 'com.novoda:bintray-release:0.5.0'
    }
}

allprojects {
    repositories {

        jcenter()
        maven {
            url 'https://maven.google.com'
            name 'Google'
        }
        maven { url 'https://jitpack.io' }
    }
}

你可能感兴趣的:(Error:(6, 0) Gradle DSL method not found: 'google()')