【问题标题】:Could not find method classpath() for arguments [com.android.tools.build:gradle:3.0.0-alpha3]找不到参数的方法 classpath() [com.android.tools.build:gradle:3.0.0-alpha3]
【发布时间】:2017-07-23 15:21:47
【问题描述】:
// 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 build 时会产生错误。

【问题讨论】:

    标签: android android-studio


    【解决方案1】:

    使用classpath 'com.android.tools.build:gradle:3.0.0-alpha6'Sync OR 试试 cleanrebuild 以上更改后 希望它对你有用

    【讨论】:

      猜你喜欢
      • 2018-01-11
      • 1970-01-01
      • 2019-11-22
      • 1970-01-01
      • 1970-01-01
      • 2018-04-11
      • 1970-01-01
      • 2019-10-21
      • 1970-01-01
      相关资源
      最近更新 更多