Andriod(三):配置文件build.gradle与AndroidManifest.xml
16lz
2021-01-26
一、编译配置文件build.gradle
一般只需关注模块级别的即可。
apply plugin: 'com.android.application'android { //指定编译用的SDK版本号。如28代表使用的是Android9.0编译 compileSdkVersion 28 //指定工具版本号,这里头两个数字必须与compileSdkVersion保持一致可以去SDK\build-tools找到 //buildToolVersion"28.0.3" defaultConfig { //指定该模块的应用编号,即APP的包名。该参数为自动生成无需修改 applicationId "com.example.myapplication" //指定APP适合运行的最小SDK版本号 minSdkVersion 15 //指定目标设备的SDK版本号 targetSdkVersion 28 //指定APP的应用版本号 versionCode 1 //指定应用版本的名称 versionName "1.0" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" } buildTypes { release { //指定是否开启代码混淆功能。true表示开启 minifyEnabled false //指定代码混淆规则文件的文件名 proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' } }}//指定APP编译的依赖信息dependencies { //指定引用java包的路径 implementation fileTree(dir: 'libs', include: ['*.jar']) implementation 'com.android.support:appcompat-v7:28.0.0' implementation 'com.android.support.constraint:constraint-layout:1.1.3' //指定单元测试编译用的Junit版本号 testImplementation 'junit:junit:4.12' //指定编译Android的高版本支持库 //implementation"com.android.support:appcompat-v7:28.0.0" androidTestImplementation 'com.android.support.test:runner:1.0.2' androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'}
更多相关文章
- Android之一键连接指定wifi
- android Listview 获取任意指定item数据 getChildAt 挂起 解决办
- 解决Android编译时无法匹配到AVD的问题
- android之android.intent.category.DEFAULT的用途和使用 隐式Int
- GmSSL Android端 :使用Android(安卓)Studio 调试Native
- android.源码启动模拟器
- Android(安卓)NDK r8e java.lang.UnsatisfiedLinkErro错误解决方
- android viewFlipper 使用
- mac android ndk第一步