当前位置:网站首页>Gradle remove dependency demo
Gradle remove dependency demo
2022-07-31 07:09:00 【Max Heng】
//1. Directly rely on third-party open source libraries, usually hosted in jitpack or jcenterimplementation 'com.google.code.gson:gson:2.2.4'implementation 'com.android.support:cardview-v7:25.0.0'implementation 'com.android.support:design:25.0.0'//2. Directly rely on the local aar file, usually in the libs directoryimplementation(name: 'LiteAVSDK_Professional_5.1.5293', ext: 'aar')//3. Directly depend on the local jar fileimplementation files('libs/bdasr_V3_20170801_60da871.jar')//4. Depend on the local modelimplementation project(':wavelibrary')implementation project(':android-ffmpeg')Library project dependency delivery problem
1. Commonly used basic types of dependencies are: provided and compile. Provided will not be packaged into apk or aar only when the compilation takes effect; compile will be packaged into apk or aar (if it is a library project, there are special cases,Refer to 3 below).
2. The current (compile+) dependencies of the app project will be packaged into the app
3. In the library project:
1) jar package: remote dependencies will not be packaged into aar; local dependencies will;
2) aar: Neither remote nor local will be packaged into aar.
3) If you want to provide the aar of your library project to others, you need to tell him other aars and remote jar packages that the library project depends on (because they are not packaged into aar)
4) If the dependency is passed through the project (ie compile project(':lib')), the dependency can be passed, so there is no need to declare the dependency once.
Remove duplicate dependencies
1. The third-party library also uses the same library for implementation or compile dependencies
implementation('com.allenliu.versionchecklib:library:2.0.5') {exclude group: 'com.android.support', module: 'appcompat-v7'exclude group: 'com.android.support.constraint', module: 'constraint-layout'exclude group: 'org.greenrobot', module: 'eventbus'exclude group: 'com.squareup.okhttp3', module: 'okhttp'}边栏推荐
猜你喜欢

全网首发!ADK To Win11PE(1)中文+包

mysql索引失效的常见9种原因详解

【编程题】【Scratch三级】2022.03 冬天下雪了

11.0 堆参数调优入门之堆参数调整

vmware搭建redis集群遇到问题

银河麒麟V10 sp1服务器安装英伟达显卡驱动

外贸网站优化-外贸网站优化教程-外贸网站优化软件

Analysis of the implementation principle and detailed knowledge of v-model syntactic sugar and how to make the components you develop support v-model

Oracle入门 02 - IT软硬件平台及操作系统介绍

Oracle入门 06 - Windows 服务器安装配置
随机推荐
TypeScript基本类型
批量免费文字翻译
试题 历届真题 错误票据【第四届】【省赛】【B组】
简单谈谈Feign
TCP/IP协议和互联网协议群
frp内网穿透服务
在级联选择器,根据不会重复的字段,来获取当前的对象
服务器硬件及RAID配置实战
浅层了解欧拉函数
【TA-霜狼_may-《百人计划》】美术2.3 硬表面基础
Oracle入门 06 - Windows 服务器安装配置
10.0 堆体系结构概述之元空间/永久代
拉格朗日插值及其应用
TypeScript编译(tsconfig.json)
OSI七层模型
文本三剑客之e`grep,seq文本编辑工具
芯塔电子斩获第十一届中国双创大赛芜湖赛区桂冠
Debian 10 iptables (防火墙)配置
零样本学习&Domain-aware Visual Bias Eliminating for Generalized Zero-Shot Learning
Oracle入门 09 - Linux 文件上传与下载