gradle中文教程
- 作者: 阴隐淫音
- 来源: 51数据库
- 2020-10-03
android studio设置build Tool版本的方式是:
每个项目的build.gradle里可以设置,例如
android {
....
buildToolsVersion '20.0.0'
....
}
build tool是android官方提供的,一般来说向下兼容(但不绝对)
代码如下:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.2.3'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
mavenCentral()
maven {
url ""
}
}
}
任务占坑
每个项目的build.gradle里可以设置,例如
android {
....
buildToolsVersion '20.0.0'
....
}
build tool是android官方提供的,一般来说向下兼容(但不绝对)
代码如下:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.2.3'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
mavenCentral()
maven {
url ""
}
}
}
任务占坑
推荐阅读
