apply plugin: 'com.android.application' android { //指定编译用的SDK版本号,如25表示使用Android 7.1编译 compileSdkVersion 25 //指定编译工具的版本号。这里的头两位数字必须与compileSdkVersion一致,具体的版本号可在sdk安装目录的sdk\build-tools下找到 buildToolsVersion "25.0.2" defaultConfig { //指定该模块的应用编号,即App的包名。该参数为系统自动生成,无需修改 applicationId "com.zhangtao.pptdemo" //指定APP适合运行的最小SDK版本号。 minSdkVersion 14//指定目标版本的SDK版本号,即该App最希望在哪个版本的Android上运行
targetSdkVersion 23
//指定App的应用版本号
versionCode 1
//指定App的应用版本名称
versionName "1.0" } buildTypes { release {
//指定是否开启代码混淆功能。false无需混淆.
minifyEnabled false
//指定代码混淆规则文件的文件名
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } }} //指定App编译的依赖信息 dependencies {
//指定引用jar包的路径
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' })
//指定编译Android的高版本支持库,如AppCompatActivity必须指定编译appcompat-v7库
compile 'com.android.support:appcompat-v7:25.+'
//指定单元测试编译用的junit版本号
testCompile 'junit:junit:4.12'
}
android模块配置文件build.gradle加中文备注
最新推荐文章于 2021-08-03 23:25:52 发布