如何在android库模块中添加依赖项

时间:2018-01-08 11:58:49

标签: android gradle module dependencies

我正在创建一个新项目,在该项目中我将自己创建的库添加为库模块,但在添加它们之后,依赖项无法从我的应用程序类访问,甚至无法在库模块中工作。

第一种情况: 库模块 - 应用程序类(用于初始化firebase分析,滑动等)

In the above case I am not able to use Application class in App Module, because for a single project one Application class is required

第二种情况:如果我在App模块中初始化Firebase和Glide等,则通过删除库模块Application类来实现Application类。然后我需要在库模块中添加app模块依赖。

 In the above case  If I am doing that circular dependency is coming.

所以请帮我解决这个问题。

此致

0 个答案:

没有答案
相关问题