如何捆绑依赖的资源,用我自己的AAR相处? [英] How to bundle a dependency's resources along with my own aar?

查看:206
本文介绍了如何捆绑依赖的资源,用我自己的AAR相处?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要建一个使用包含资源依赖其他库的库。如果它的事项,即依赖关系是Facebook的SDK。

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

问题是,每当我加我的库作为依赖到另一个项目它不合并依赖的资源,我的AAR。

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?

推荐答案

AAR的文件好好尝试一下包含传递依赖。

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.

另一种是发布库Maven仓库(公共或私营)。摇篮在这种情况下,与POM文件能够同时下载的依赖关系。

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.

这篇关于如何捆绑依赖的资源,用我自己的AAR相处?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆