我有此gradle错误。
错误:(9,0)未找到Gradle DSL方法:“ compile()”
我曾尝试参考类似的问题,但没有成功。
Android gradle build错误:(9,0)未找到Gradle DSL方法:“ compile()”。
同步Build.Gradle时出现错误“找不到Gradle DSL方法:'compile()'”
找到了不受支持的Gradle DSL方法:“ compile()”!
我的build.gradle代码在这里
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.0.0'
compile 'com.android.support:appcompat-v7:20.+'
compile 'com.google.android.gms:play-services:6.5.+'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
}
}
build.gradle(Module.app)
apply plugin: 'com.android.application'
android {
compileSdkVersion 21
buildToolsVersion "21.1.1"
defaultConfig {
applicationId "com.example.simplemaker.pushtest"
minSdkVersion 9
targetSdkVersion 21
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:21.0.3'
}
我的代码有什么问题?
对不起我的英语不好。
非常感谢!
