项目级别的build.gradle一般无须改动,我们只需关注模块级别的build.gradle。下面就自己记一下build.gradle中的参数用途吧。

android {    compileSdkVersion 25    //指定编译用的SDK版本号,如25表示使用Androd7.1编译    buildToolsVesion"25.0.2"    //指定编译工具的版本号,这里的头两位数字必须与compleSdkVersion保持一致,具体的版本号可在sdk安装目录的sdk/buile-tools下找到    defaultConfig {        applicationId "com.example.helloworld.liaotianshi"        //指定该模块的应用编号,即App的包名,该参数为自动生成,无须修改        minSdkVersion 15        //指定APP适合运行的最小SDK版本号,如15表示至少要在Android4.0.3上运行        targetSdkVersion 28        //指定目标设备的SDK版本号,即该APP最希望在那个版本的Android上运行        versionCode 1        //指定APP的应用版本号        versionName "1.0"        //指定APP的应用版本名称        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"    }    buildTypes {        release {            minifyEnabled false            //指定是否开启代码混淆功能,true表示开启混淆,false表示无须混淆。            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'            //指定代码混淆规则文件的文件名        }    }}dependencies {//指定APP编译的依赖信息    implementation fileTree(dir: 'libs', include: ['*.jar'])    implementation 'com.android.support:appcompat-v7:28.0.0-beta01'    implementation 'com.android.support.constraint:constraint-layout:1.1.2'    //指定引用jar包的路径    testImplementation 'junit:junit:4.12'    //指定单元测试编译用的junit版本号    androidTestImplementation 'com.android.support.test:runner:1.0.2'    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'}

 

更多相关文章

  1. 在Ubuntu上为Android增加硬件抽象层(HAL)模块访问Linux内核驱动程
  2. Android Studio怎么新建Android公共库模块?
  3. Android帧缓冲区(Frame Buffer)硬件抽象层(HAL) 模块Gralloc的实现原
  4. android studio开发安卓应用设置版本号
  5. Android Kotlin开发模块之间跳转-ARouter
  6. Android版本号与API级别对应关系表
  7. Android 设置百度地图最大最小缩放级别
  8. Android ril移植-6410开发板SIM300模块

随机推荐

  1. Android的系统架构
  2. Android系列教程之Android项目的目录结构
  3. android Widget添加过程和android添加wid
  4. Android核心分析(17) ------电话系统之rilD
  5. android蓝牙遥控车
  6. Android中级进阶 FAQ
  7. android资源
  8. 使用Maven管理Android项目(一)
  9. Android使用TextView实现无下划线超链接
  10. Android文档(一)——什么是Android?