错误:(19,0)未找到Gradle DSL方法:';android();未解决
我有个问题: 错误:(19,0)找不到Gradle DSL方法:“android()” -项目“x”可能正在使用gradle thet的版本,但不包含该方法 打开gradle包装文件 -生成文件可能缺少gradle插件 应用渐变插件 build.gradle:错误:(19,0)未找到Gradle DSL方法:';android();未解决,android,Android,我有个问题: 错误:(19,0)找不到Gradle DSL方法:“android()” -项目“x”可能正在使用gradle thet的版本,但不包含该方法 打开gradle包装文件 -生成文件可能缺少gradle插件 应用渐变插件 build.gradle: buildscript { repositories { jcenter() } dependencies { classpath 'com.android.tools.build
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.5.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
}
}
android {
buildToolsVersion '23.0.0'
}
dependencies {
}
app.gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 22
buildToolsVersion "23.0.0 rc3"
compileOptions {
encoding "UTF-8"
}
defaultConfig {
applicationId "es.albertoramos.pfcalbertoramos"
minSdkVersion 15
targetSdkVersion 22
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:22.2.1'
}
如何解决此问题?删除:
android {
buildToolsVersion '23.0.0'
}
dependencies {
}
从顶级build.gradle
删除:
android {
buildToolsVersion '23.0.0'
}
dependencies {
}
从顶级build.gradle