Android的工作室构建脚本错误,不支持发现的gradle DSL方法:机器人()!
问题描述:
我升级了Android Studio来0.6然后导入0.3开发项目
I upgraded the Android Studio to AS 0.6 then imported the project developed in AS 0.3
我收到错误,如:
Build script error,unsupported Gradle DSL method found : android()'!,
Possible causes could be:
- you are using Gradle version where the method is absent
("open_gradle_settings">Fix Gradle settings</a>)
- you didn't apply Gradle plugin which provides the method
(<a href="apply_gradle_plugin">Apply Gradle plugin</a>)
or there is a mistake in a build script (<a href="goto_source">Goto source</a>)
我改变了我的依赖路径的build.gradle
来:
dependencies {
classpath 'com.android.tools.build:gradle:0.11.+'
}
android {
compileSdkVersion 19
buildToolsVersion "19.1.0"
defaultConfig {
minSdkVersion 14
targetSdkVersion 14
}
可能是什么问题?
What might the problem?
有没有告诉如何将项目升级?任何指导
Is there any guide which tells how to upgrade the project?
答
其实这在错误信息说明。所以只需添加
Actually it stated in the error message. So just add
apply plugin: 'com.android.application'
之间的依赖关系
部分和机器人
部分