Android的工作室说,使用1.10摇篮 - 但新版本是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
这件事发生时,我下载了最新的Android 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