名詞解釋:android
1,Gradle: Gradle是一種構建工具,它使用一種基於Groovy的特定領域語言(DSL)來構建項目。不單單用於android 工程的構建。app
2,Android Plugin for Gradle: 這就是爲了編譯android 工程而開發的插件。下面就是申明Android Gradle 插件的位置。(build.gradle)工具
buildscript { ... dependencies { classpath 'com.android.tools.build:gradle:2.2.0' } }
1,gradle 各版本源碼地址gradle
http://services.gradle.org/distributions/ui
2, google 官網 gradle 插件 與 gradle 版本對照地址this
https://developer.android.google.cn/studio/releases/gradle-plugin#updating-plugingoogle
3,gradle 版本與google gradle 插件版本的區別spa
在gradle wrapper.properties 中寫的是 gradle 版本。插件
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip
在build.gradle 中依賴的是 gradle插件版本。code
dependencies { //[this is the android gradle plugin version] classpath 'com.android.tools.build:gradle:3.1.0' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files }