找不到参数的方法classpath()[com.android.tools.build:gradle:3.0.0-alpha3]

时间:2017-07-21 09:31:56

标签: android android-studio

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    ext.kotlin_version = '1.1.3-2'
    repositories {
        google()
        jcenter()
    }
}

dependencies {
    classpath 'com.android.tools.build:gradle:3.0.0-alpha3'
    classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files

allprojects {
    repositories {
        google()
        jcenter()
        mavenCentral()
    }
}

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

我正在使用android studio 3.0 canary 6,build.gradle版本存在问题。它在追求gardle构建时会产生错误。

1 个答案:

答案 0 :(得分:0)

使用classpath 'com.android.tools.build:gradle:3.0.0-alpha6'Sync OR试试 上述更改后cleanrebuild 希望它为你工作