【发布时间】:2014-07-07 06:20:16
【问题描述】:
下面给出了我的 build.gradle。我发现了这个错误。
Error:(15) A problem occurred evaluating root project 'smartwisher'.
> Could not find method android() for arguments [build_3rvo44ss7197kfip29gkh81rb6$_run_closure2@1d7a1869] on root project 'smartwisher'.
这是我的 android studio 中的 build.gradle。
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.12.+'
}
}
allprojects {
repositories {
mavenCentral()
}
}
android {
compileSdkVersion 19
buildToolsVersion '20.0.0'
defaultConfig {}
productFlavors {
}
}
dependencies {
}
【问题讨论】:
-
你用的是什么gradle版本?
-
不是,最新的是 1.12,我用的是 1.10。 1.11 给了我一些错误。检查安装 gradle 的文件夹的版本号
-
哦,对不起,我使用的是 1.12
标签: android gradle android-gradle-plugin