Android Application的Gradle说明

复制代码
 1 //引入插件
 2 apply plugin: 'com.android.application'
 3 
 4 android {
 5     compileSdkVersion 29
 6     buildToolsVersion "29.0.0"
 7     defaultConfig {
 8         applicationId "com.example.myapplication"
 9         minSdkVersion 28
10         targetSdkVersion 29
11         versionCode 1
12         versionName "1.0"
13         testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
14     }
15     buildTypes {
16         release {
17             minifyEnabled false
18             proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
19         }
20     }
21 }
22 
23 dependencies {
24     //implementation定义项目主源代码的依赖
25 
26     //配置依赖libs目录下的所有jar包
27     implementation fileTree(dir: 'libs', include: ['*.jar'])
28     //配置从中央仓库下载依赖jar包
29     implementation 'androidx.appcompat:appcompat:1.0.2'
30     implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
31     //testImplementation定义项目测试代码(test目录下的代码)的依赖
32     testImplementation 'junit:junit:4.12'
33     //androidTestImplementation定义androidTest目录下的代码依赖
34     androidTestImplementation 'androidx.test:runner:1.2.0'
35     androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
36 }
复制代码

 

作者:奇

出处:https://www.cnblogs.com/fanqisoft/p/11004003.html

版权:本作品采用「本文版权归作者和博客园共有,欢迎转载,但必须给出原文链接,并保留此段声明,否则保留追究法律责任的权利。」许可协议进行许可。

posted @   SpringCore  阅读(651)  评论(0编辑  收藏  举报
编辑推荐:
· SQL Server 2025 AI相关能力初探
· Linux系列:如何用 C#调用 C方法造成内存泄露
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
阅读排行:
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· 单线程的Redis速度为什么快?
· SQL Server 2025 AI相关能力初探
· AI编程工具终极对决:字节Trae VS Cursor,谁才是开发者新宠?
· 展开说说关于C#中ORM框架的用法!
more_horiz
keyboard_arrow_up light_mode palette
选择主题
点击右上角即可分享
微信分享提示