Android Studio 报错"gradle xxx is required. current version is xxx"
2015-12-24 19:12
615 查看
gradle-wrapper.properties: 可以设置Gradle版本
distributionUrl=https\://services.gradle.org/distributions/gradle-2.8-all.zip
build.gradle: 设置Android Plug-in for Gradle的版本
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.2+'
}
}
Gradle和Android Plug-in for Gradle必须匹配,否则报错"gradle xxx is required. current version is xxx"
具体版本请参考: http://tools.android.com/tech-docs/new-build-system/version-compatibility
Gradle plugin 1.0.0 - 1.1.3 works with Gradle 2.2.1 - 2.3.
It does not work with Gradle 2.4+
Gradle plugin 1.2+ works with Gradle [2.2.1, 3.0[
Newer versions of the Plugin may require a newer version of Gradle to benefit from advanced features.
However the current 1.2+ should work with [2.2.1, 3.0[
(We cannot guaranteed compatibility with 3.x as it may introduce breaking changes: Gradle 1.x -> 2.0 introduced Groovy breaking changes)
Post 1.0 DSL compatibility
The DSL changed a lot before 1.0, but it should be stable now.
If/When we need to change things we will have long deprecation periods, likely longer than 6 months, possibly 12 months.
Preview Compatibility
This table indicate compatibility for pre-1.0 components.
All this breaking changes happened because we tweaked the model exchanged between the IDE and Gradle a lot. All this work was to ensure stability after 1.0.
distributionUrl=https\://services.gradle.org/distributions/gradle-2.8-all.zip
build.gradle: 设置Android Plug-in for Gradle的版本
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.2+'
}
}
Gradle和Android Plug-in for Gradle必须匹配,否则报错"gradle xxx is required. current version is xxx"
具体版本请参考: http://tools.android.com/tech-docs/new-build-system/version-compatibility
Gradle plugin 1.0.0 - 1.1.3 works with Gradle 2.2.1 - 2.3.
It does not work with Gradle 2.4+
Gradle plugin 1.2+ works with Gradle [2.2.1, 3.0[
Newer versions of the Plugin may require a newer version of Gradle to benefit from advanced features.
However the current 1.2+ should work with [2.2.1, 3.0[
(We cannot guaranteed compatibility with 3.x as it may introduce breaking changes: Gradle 1.x -> 2.0 introduced Groovy breaking changes)
Android Studio | Android Gradle Plugin | Gradle |
1.0.0+ | 1.0.0 - 1.1.3 | 2.2.1 - 2.3 |
1.0.0+ | 1.2+ | 2.2.1+ |
The DSL changed a lot before 1.0, but it should be stable now.
If/When we need to change things we will have long deprecation periods, likely longer than 6 months, possibly 12 months.
Preview Compatibility
This table indicate compatibility for pre-1.0 components.
All this breaking changes happened because we tweaked the model exchanged between the IDE and Gradle a lot. All this work was to ensure stability after 1.0.
Android Studio | Android Gradle Plugin | Gradle |
1.0.0 RC1 - 1.0.0 RC 4 | 0.14.0 - 1.0.0.rc4+ | 2.2, 2.2.1 |
0.9.0-0.9.3 | 0.14.0 - 0.14.4 | 2.1 |
0.8.11+ | 0.13+, 0.12+ | 2.1 (for plugin 0.13; for 0.12 use 1.10-1.12) |
0.8.0 - 0.8.10 | 0.12+ | 1.10 - 1.12 |
0.6.0, 0.6.1+ | 0.11+ | 1.10 - 1.12 |
0.5.8 - 0.5.9 | 0.9, 0.10 | 1.10 - 1.12 (1.12 requires plugin 0.10) |
0.5.0 - 0.5.7 | 0.9 | 1.10, 1.11 |
0.4.3 - 0.4.6 | 0.7, 0.8 | 1.9, 1.10 (required for plugin 0.8) |
0.4.0 - 0.4.2 | 0.7 | 1.9 |
0.3.0 - 0.3.7 | 0.6 | 1.8 |
0.2.0 - 0.2.13 | 0.5 | 1.7 |
相关文章推荐
- 深入理解Message, MessageQueue, Handler和Looper
- 搭建自家的wiki平台:win2008 破解安装confluence-5.1.4 和 汉化。
- iOS笔记UI--生成二维码Demo(不是扫码,是根据字符串生成二维码)
- UE4中多种颜色轮廓线的后期处理
- Handler Looper MessageQueue 的关系
- UIVie和CALayer属性对应关系
- iOS UIBezierPath类 介绍
- javaWEB中百度富文本编辑器UEditor1.4.3的使用随笔
- 【LEETCODE】303-Range Sum Query - Immutable
- iOS 修改UITextField的placeholder属性的字体颜色(修改UITextField占位符字体的颜色)
- 用xib自定义 可以在xib中使用的view
- BlogUI的使用
- 225. Implement Stack using Queues
- requireJS到底是什么?
- requireJS到底是什么?
- UIView常见属性
- Android Volley入门到精通:定制自己的Request
- [转]excel set drop-down values based on vlookup
- BlokUI的使用
- 示例详解:UIScrollview 与 Autolayout 的那点事