Comments (7)
首先,试用于该插件的应该是library,而不是application。
我先假设主module是library,然后主module依赖于module1, module1依赖module2;
如果module1和module2都需要合入主module中产生的aar中,则需要在主module中添加对module1以及module2的embed依赖(哪怕主module只依赖于module1, 但是module1依赖了module2,所以都需要在主module中加embed)。
而module1和module2之间的依赖关系不用修改,按照官方的implementation就行。
所有的embed关系都应该在主module中添加,不应该在子module中添加。
from fat-aar-android.
感谢回答。那主module添加对module2的依赖是只需要embed还是embed+compileOnly?
from fat-aar-android.
感谢回答。那主module添加对module2的依赖是只需要embed还是embed+compileOnly?
加compileOnly只是为了编码时引用到该依赖可以代码提示,并不会影响实际编译结果,如果你实际上不直接依赖该module,可以只加embed。
from fat-aar-android.
作者你好,还是library引用module1,module1引用module2,但是module2中引用了eventbus,okhttp等第三方,这需要特殊处理吗?另外我这里确定已经使用embed引用了所有的module,但是还有会有错误找不到符号的。
from fat-aar-android.
作者你好,还是library引用module1,module1引用module2,但是module2中引用了eventbus,okhttp等第三方,这需要特殊处理吗?另外我这里确定已经使用embed引用了所有的module,但是还有会有错误找不到符号的。
看你是否需要将eventbus和okhttp整体打包,如果需要整体打包,就需要在library中embed eventbus以及okhttp;
你可以查一下找不到的符号属于哪个module,再看看library是否有embed该module。
from fat-aar-android.
需要添加的module都已经使用embed,然后我这里改用了1.1.6版本能成功了。但是碰到另一个问题。我有个基础保common,其中包含Gson的引用,gradle使用的是api的方式引入。打出来的aar中有地方引用了gson,这个时候会报错,因为包中没有gson相关内容。不知道这块有没有什么建议。
目前使用的版本情况是:
gradle插件:3.4.1
gradle-wrapper: 5.1.1
fat-aar: 1.1.6
AndroidStudio: 3.4.1
from fat-aar-android.
需要添加的module都已经使用embed,然后我这里改用了1.1.6版本能成功了。但是碰到另一个问题。我有个基础保common,其中包含Gson的引用,gradle使用的是api的方式引入。打出来的aar中有地方引用了gson,这个时候会报错,因为包中没有gson相关内容。不知道这块有没有什么建议。
要么将gson通过embed一起打包,要么在app中引入aar的同时通过implementation或者api引入该gson库。
from fat-aar-android.
Related Issues (20)
- 1.3.8的fat-aar版本,AGP 7.3 Gradle7.4,资源文件没merge到一起,class什么的都merge到一起了。 HOT 11
- Duplicated *.so resources HOT 5
- packagingOptions的配置对这个插件生效吗
- resources not included on AGP 7.3.0 HOT 2
- Build fat AAR file from flutter module
- Binding Resouces (.BR) not created for sub lib,
- java.lang.NoSuchFieldError: No static field ic_rapido_splash of type I in class Lcom/rapido/passenger/R$drawable; or its superclasses
- Could not resolve all dependencies for configuration ':dsrrdlibrary:embed HOT 1
- Android Resource linking failed
- Support for Gradle 8+, AGP 8+ HOT 3
- 如何过滤abi,打出来的最终AAR包含了x86,armeabi,armeabi-v7a,arm64-v8a所有的so,不想要这么多,abiFilters不生效
- Failed to apply plugin [id 'com.kezong.fat-aar'] HOT 2
- java.lang.NoClassDefFoundError: Failed resolution of: Landroidx/lifecycle/runtime/R$id; HOT 1
- 完全不生效
- Task with name 'transformClassesWithTransformRForFataarDebug' not found in project HOT 2
- 一种安全的替换 fat-aar-android 插件的方法 HOT 8
- Is there a package relocation for the embed dependencies?
- 请问下如何配置Gradle 8.0版本 HOT 1
- How to exlcude "org.jetbrains.kotlin:kotlin-stdlib" HOT 2
- Cannot Merge SmartRefreshLayout 打包Module无法合并SmartRefreshLayout
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fat-aar-android.