Android的工作室构建脚本错误,不支持发现的gradle DSL方法:机器人()! [英] Android studio build script error,unsupported gradle DSL method found : android()!

查看:418
本文介绍了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'

之间的依赖关系部分和机器人部分

这篇关于Android的工作室构建脚本错误,不支持发现的gradle DSL方法:机器人()!的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆