android - Android Studio不支持的gradle版本,但我使用的是兼容版本

标签 android gradle android-studio android-gradle-plugin

我在Ubuntu 14.04上,并且正在使用Android Studio的0.5.2版本。我正在尝试将此项目导入我的Android Studio GCM SAMPLE

但是我得到这个错误:

它说我应该使用Gradle的1.10版本。

但是,我确实在使用该版本。

这是怎么回事

最佳答案

它给您错误的错误信息。实际的问题是该项目使用了错误版本的Android Gradle插件-该项目指定了0.7,但Android Studio 0.5.2需要0.9。

在此项目的顶级build.gradle中,在此块中:

buildscript {
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:0.7.+'
    }
}

classpath行更改为:
        classpath 'com.android.tools.build:gradle:0.9.+'

关于android - Android Studio不支持的gradle版本,但我使用的是兼容版本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24230092/

相关文章:

android - ListView 未显示在应用程序上

android - 在 android studio 中使用 View 时出现渲染问题

android - 如何让Android手机的firefox在电脑上打开我的wordpress?

c# - 是否可以保持统一激活脚本?

android - Gradle 错误 : Duplicate value for resource 'attr/font' with config "solutions not working

android - 错误:无法启动守护进程。VM初始化期间发生错误无法为1572864KB对象堆保留足够的空间

android - Android Studio 中 NFC 技术过滤器不支持的类型技术列表

android - 如何从命令行启动 Android 测试单元

安卓应用 : logging in using google ID?

gradle - 试图了解 gradle 项目属性