【问题标题】:Gradle version 1.10 is required. Current version is 2.2.1. error(20,0) Gradle DSL method not found: 'buildTypes()'需要 Gradle 版本 1.10。当前版本是 2.2.1。错误(20,0)未找到 Gradle DSL 方法:'buildTypes()'
【发布时间】:2015-11-06 06:54:15
【问题描述】:

当我将现有项目导入到 android studio 时出现错误。下面我附上了错误消息的屏幕截图..

我们使用的是 android studio 1.2.2 版。我们的系统是 Windows 7 32 位

Error:Gradle version 1.10 is required. Current version is 2.2.1. 

请指导我们。

【问题讨论】:

  • 您使用的是哪个版本的 gradle 和 gradle 插件?

标签: android android-studio android-gradle-plugin build.gradle android-build


【解决方案1】:

检查项目中使用的 gradle 和 gradle 插件的版本。

在你的build.gradle(这是gradle插件版本)你可以使用:

buildscript {
    repositories {  
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:1.2.3'
    }
}

gradle/wrapper/gradle-wrapper.properties(这是gradle版本)

distributionUrl=http\://services.gradle.org/distributions/gradle-2.4-all.zip

gradle-plugin和gradle版本有关系,需要兼容。

查看这些链接以获取完整版本兼容性映射表:

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2014-08-08
    • 1970-01-01
    • 1970-01-01
    • 2016-12-28
    • 2016-05-11
    • 2019-11-22
    • 2023-04-05
    相关资源
    最近更新 更多