Android Gradle plugin与Gradle 版本对应问题

本文主要是引用google官方网站的内容,仅此做个记录或者笔记,做个问题归类!
https://developer.android.google.cn/studio/releases/gradle-plugin.html#
在这边文章中,写了关于Android的Gradle插件与Gradle版本的对应问题。具体如下:
The following table lists which version of Gradle is required for each version of the Android plugin for Gradle. For the best performance, you should use the latest possible version of both Gradle and the Android plugin.
这里写图片描述

You can specify the Gradle version in either the File > Project Structure > Project menu in Android Studio, or by editing the Gradle distribution reference in the gradle/wrapper/gradle-wrapper.properties file. The following example sets the Gradle version to 3.3 in the gradle-wrapper.properties file.

distributionUrl = https\://services.gradle.org/distributions/gradle-3.3-all.zip
  
  
  • 1
  • 1

Revisions
For a summary of known issues in Android plugin for Gradle, see the Known Issues page.




Gradle Version

Gradle 版本。需要在gradle/wrapper/gradle-wrapper.properties中修改。(文件较大,最好自己下载好放到相应位置。mac的位置为: /Users/your user name/.gradle/wrapper/dists)

Android Plugin for Gradle Version

Android工程使用Gradle进行编译的工具版本,与Gradle版本有一定的对应关系。这个在工程顶级的build.gradle中定义。下一次编译工程或者点击sync project with gradle的时候更新。

如:build.gradle

buildscript {

dependencies {

classpath 'com.android.tools.build:gradle:2.2.2'

}

}


上面两个均可以在File->Project Structure->Project中更改


Compile SDK Version

Build Tools Version

minSDK Version

app支持的最低系统版本

targetSDK Version

app最佳运行版本

version Code

app的软件版本

version Name

app显示的软件版本名



Android Plugin for Gradle对应Gradle版本
Plugin version Required Gradle version
1.0.0 - 1.1.3 2.2.1 - 2.3
1.2.0 - 1.3.1 2.2.1 - 2.9
1.5.0 2.2.1 - 2.13
2.0.0 - 2.1.2 2.10 - 2.13
2.1.3+ 2.14.1+

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值