Android(安卓)Gradle 基础认识
16lz
2021-12-04
项目全局的Gradle
buildscript { repositories { jcenter() } dependencies { //指定以来的Gradle版本 classpath 'com.android.tools.build:gradle:2.2.2' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files }}allprojects { repositories { //制定Gradle的代码仓库 jcenter() }}
Model gradle
//表示这个model是一个Android Application,这包括了Android项目所用到的所有工具apply plugin: 'com.android.application'//表示该model构建过程中所用到的所有参数,android { //SDK版本 compileSdkVersion 23 //Android build tools版本 buildToolsVersion "23.0.3" defaultConfig { applicationId "com.pp.fanqie" minSdkVersion 14 targetSdkVersion 23 versionCode 1 versionName "1.0" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } }}//表示Android model构建中所用到的依赖库dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { exclude group: 'com.android.support', module: 'support-annotations' }) testCompile 'junit:junit:4.12'}
local.properties
这里配置了Android Gradle插件所使用的Android SDK路径。
更多相关文章
- SDK/ADT历史版本
- zxing项目源码解读(2.3.0版本,Android部分)
- Android(安卓)studio添加第三方类库时出现的版本不兼容问题
- 安卓开发38:安卓的滚动条相关属性
- Android(安卓)studio 连接数据库小经历遇到的问题以及解决方法(ja
- android 之 @ 与? 的区别
- scrollbarsstyle
- android:versionCode和android:versionName 用途
- Android学习笔记06:线性布局LinearLayout