Android的工作室说,使用1.1​​0摇篮 - 但新版本是1.12? [英] Android Studio says to use Gradle 1.10 - but new version is 1.12?

查看:123
本文介绍了Android的工作室说,使用1.1​​0摇篮 - 但新版本是1.12?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

错误:

The project is using an unsupported version of Gradle.  Please use version 1.10.


My `gradle.build` file says this:

dependencies {
      classpath 'com.android.tools.build:gradle:0.12.+'
}

据我所知,上面一行是正确的。我的摇篮-包装文件说:

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

这件事发生时,我下载了最新的Andr​​oid Studio的测试(8节),并试图导入一个应用程序,有什么我以为是一个老版本的摇篮。

This happened when I downloaded the newest Android Studio beta (v.8) and tried to import an app that had, what I assume is an old version of Gradle.

此外,当我打修正摇篮包装和重新导入项目,没有任何反应。

Also, when I hit "Fix Gradle Wrapper and re-import project", nothing happens.

推荐答案

如果你想在摇篮 - 包装换到一个较低的版本,您必须distributionUrl改为

If you want to change the gradle-wrapper to a lower version you have to change distributionUrl to

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

然后重新运行的包装任务。如果这还不够只是删除了文件夹 .gradle 摇篮,文件 gradlew gradlew.bat 。 在重新运行的包装,他下载gralde 1.10

and then rerun the wrapper task. If this isn't enough just delete the folders .gradle and gradle and the files gradlew and gradlew.bat. The rerun wrapper and he downloads gralde 1.10

由于摇篮已经从1.10版和1.12一些主要的API改变,你不能建立一个更高的版本,则插件是建立与任何项目。因此,如果Android插件是建立与摇篮1.10,你必须使用相同的版本

Since gradle had some major api changes from version 1.10 and 1.12 you can not build any project with a higher version then the plugins are build with. So if the android plugin is build with gradle 1.10 you have to use the same version

这篇关于Android的工作室说,使用1.1​​0摇篮 - 但新版本是1.12?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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