android提示:Gradle DSL method not found: 'android()'

出现这个问题,是因为在Project下的build.gradle文件中出现了android属性造成的,正常情况下Project下的build.gradle中文件中只有三个属性:buildscript、allprojects、dependencies(很多情况下是为空的)。

android提示:Gradle DSL method not found: 'android()'_第1张图片

里面包含的内容如下:

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

    repositories {
        jcenter()
    }

    //配置gradle版本
    dependencies {
        classpath 'com.android.tools.build:gradle:1.3.0'
    }
}
allprojects {
    repositories {
        jcenter()
    }
}

dependencies {
}



你可能感兴趣的:(android,android,gradle,gradle,method,DSL,Studio,not,found:,'android()')