小编Hey*_*yya的帖子

无法在Android Studio项目中为参数找到方法android()

我正在尝试在我的android工作室项目上进行成绩同步,并且我在标题中不断收到此错误.我的build.gradle文件是

// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
    jcenter()
}
dependencies {
    classpath 'com.android.tools.build:gradle:2.2.1'

    // 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
}

android {
compileSdkVersion 24
buildToolsVersion '24.0.0'
}
dependencies {

}
Run Code Online (Sandbox Code Playgroud)

我的错误信息是

Gradle sync failed: Could not find method android() for arguments …
Run Code Online (Sandbox Code Playgroud)

android build gradle android-studio android-gradle-plugin

11
推荐指数
3
解决办法
5万
查看次数