build.gradle注释
16lz
2021-01-24
apply plugin: 'com.android.application'android { //指定编译用的SDK版本号。如28表示使用Android 9.0编译 compileSdkVersion 28 defaultConfig { //指定该模块的应用编号,即APP的包名 该参数自动生成,无须修改 applicationId "com.example.administrator.helloworld" //指定App运行适合运行的最小SDK版本号 如15表示至少要Android 4.1 上运行 minSdkVersion 15 //指定目标设备的SDK版本号 即该App最希望在哪个版本的Android 上运行 targetSdkVersion 29 //指定App的应用版本号 versionCode 1 //指定App的应用版本名称 versionName "1.0" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" } buildTypes { release { //指定是否开启代码混淆功能 true表示开启混淆,false表示无须混淆 minifyEnabled false //指定代码混淆规则文件的文件名 proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } }}//指定App编译的依赖信息dependencies { //指定引用jar包的路径 implementation fileTree(dir: 'libs', include: ['*.jar']) //指定编译Android的高版本支持库 如AppCompatActivity必须指定编译appcompat-v7库 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' androidTestImplementation 'com.android.support.test:runner:1.0.2' androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'}
implementation 'com.android.support:appcompat-v7:28.0.0必须要根据支持库的实际版本号,否则会报错
更多相关文章
- Android显示提示信息,实现两个界面之间的跳转
- Android(安卓)SDK 源码下载
- Android(安卓)简单音乐播放器开发
- android fragment 切换时隐藏软键盘
- android在代码里设置button或者textView的字体颜色
- Android(安卓)6.0 ContextCompat中不包含CheckSelfPermission异
- android xml解析 XmlPullParser的使用
- textview cannot be resolved to a type 的解决办法
- android怎么将已经安装在内存上的应用程序移动到SD卡上