休言女子非英物,夜夜龙泉壁上鸣。这篇文章主要讲述android studio gradle统一管理版本相关的知识,希望能为你提供帮助。
创建config.gradle
ext { android = [ compileSdkVersion: 26, buildToolsVersion: "26.0.2", minSdkVersion: 15, targetSdkVersion: 26, versionCode: 1, versionName: "1.0", androidSupportVersion: "26.1.0", ] dependencies = [ "annotations": "com.android.support:support-annotations:${android["androidSupportVersion"]}", "appcompat-v7": "com.android.support:appcompat-v7:${android["androidSupportVersion"]}", "design": "com.android.support:design:${android["androidSupportVersion"]}", ] }
使用
project--gradle
apply from : "config.gradle"
app--gradle
defaultConfig { applicationId "com.example.ma.demo" minSdkVersion rootProject.ext.android["minSdkVersion"] targetSdkVersion rootProject.ext.android["targetSdkVersion"] versionCode 1 versionName "1.0" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" }
dependencies { implementation fileTree(include: [‘*.jar‘], dir: ‘libs‘) implementation rootProject.ext.dependencies["appcompat-v7"]
}
【android studio gradle统一管理版本】
推荐阅读
- jQuery中append appendTo prepend prependTo insertBefore insertAfter after before之间的区别
- 全民充电节APP又上新福利,你发现了吗()
- Android Studio 经常使用手冊
- 手工增加Mapping
- 使用ionic cordova build android --release --prod命令打包报错解决方法
- android app 闪屏
- 微信app支付(android端+java后台)
- Android8.0适配之一应用图标适配
- @RequestMapping与@RequestParam注解