当前位置:网站首页>Solution: direct local.Aar file dependencies are not supported when building an aar
Solution: direct local.Aar file dependencies are not supported when building an aar
2022-07-29 00:07:00 【Sharp surge】
ndroid Studio 4.0+ Version throws the following exception during packaging
Direct local .aar file dependencies are not supported when building an AAR.
The resulting AAR would be broken because the classes and Android resources from any local .aar file dependencies would not be packaged in the resulting AAR.
Previous versions of the Android Gradle Plugin produce broken AARs in this case too (despite not throwing this error).
The following direct local .aar file dependencies of the :XXXXXXXXXX
The solution is as follows :
1. Create a new one module, Major reservations build.gradle file ( Other documents can be deleted )
2. take “The following direct local .aar file dependencies of the :” Post prompted aar Put the file into the new module In the root directory of ,module The directory structure is as follows :

3. modify build.gradle The contents of the document , as follows :
configurations.maybeCreate("default")
artifacts.add("default", file('xxxx.aar'))
// If there are more than one aar, Just need to do it again add
//artifacts.add("default", file('xxxx2.aar'))
//......
//artifacts.add("default", file('xxxxn.aar'))
4. The original aar Of module Go to module The form of depends on new module, The dependency form is compileOnly, as follows :
dependencies {
...
compileOnly project(path: ':newmodule')
...
}
5. Just pack it again
————————————————
Copyright notice : This paper is about CSDN Blogger 「sayhello_class」 The original article of , follow CC 4.0 BY-SA Copyright agreement , For reprint, please attach the original source link and this statement .
Link to the original text :https://blog.csdn.net/sayhello_class/article/details/123047897
边栏推荐
- Where is the DP interface of desktop computer (what if the host has no DP interface)
- GhostNets on Heterogeneous Devices via Cheap Operations
- C language n*n matrix evaluation and inverse matrix [easy to understand]
- Do you know any formal part-time platforms?
- Leetcode64. 最小路径和
- 有效供应链管理的八大绩效分析指标(上)
- Jincang database kingbasees client Programming Interface Guide - ODBC feature support constraints
- [data mining engineer - written examination] Dahua shares in 2022
- 【TA-霜狼_may-《百人计划》】美术2.2 模型基础
- mysql索引失效的常见9种原因详解
猜你喜欢

【C】替换空格,宏实现整数的二进制奇偶位交换

Eight performance analysis indicators of effective supply chain management (Part 1)

Uricase - Characteristics of uricase in Worthington pig liver:

以JSP为视图解析器搭建SSM项目

Leetcode61. 旋转链表

【C】喝汽水,找单身狗问题

【C】atoi和offsetof的介绍和模拟实现

Have passed hcip and joined the company of your choice, and share the learning experience and experience of Huawei certification

[TA frost wolf _may- "hundred people plan"] art 2.2 model basis

EN 1873 assembly accessories for roofing - plastic single roof lamps - CE certification
随机推荐
curl (7) Failed connect to localhost8080; Connection refused
EN 12101-8:2011 smoke dampers for smoke and heat control systems - CE certification
Android studio connects to MySQL and completes simple login and registration functions
1-5 类式组件
NAT如何配置地址转换
Powercli batch add esxi to vCenter
PowerCLi VMware vCenter 通过自建的PXE Server一键批量部署常规New-VM
[data mining engineer - written examination] Dahua shares in 2022
Tyrosine decarboxylase -- characteristics of tyrosine decarboxylase of Streptococcus faecalis in Worthington
Servlet operation principle_ API details_ Advanced path of request response construction (servlet_2)
Those "experiences and traps" in the data center
实时数仓:美团基于Flink的实时数仓建设实施
Data warehouse: Doris' application practice in meituan
【C】 Reverse string (two recursive ideas)
Hutool official website (is hutool easy to use)
YOLOV5学习笔记(一)——原理概述
VirtualLab基础实验教程-8.傅里叶变换(1)
Explanation of history and chemical properties of Worthington ribonuclease B
Leetcode62. 不同路径
Briefly introduce the working principle and characteristics of block cipher encryption block link mode (cryptography shift cipher encryption and decryption)