How to bundle a dependency's resources along w

2019-07-12 21:25发布

问题:

I'm building a library that uses another library which contains resources as a dependency. If it matters, that dependency is the Facebook SDK.

The problem is whenever I add my library as a dependency to another project it's not merging the dependency's resources to my aar.

Why this happens and why all the resources are not getting bundled?

回答1:

The aar file doens't contain the transitive dependencies.

It means that you have to add these dependencies also in the project where you use the library.

An alternative is to publish the library in a maven repository (public or private). Gradle in this case with the pom file is able to download also the dependencies.