如何访问或引用图书馆中的图书馆

时间:2018-12-11 02:14:57

标签: java android aar

我制作了InnerLibrary(aar)和OutterLibrary(aar)和MyApplication(Android应用程序)

OutterLibrary具有InnerLibrary,而MyApplication具有OutterLibrary

MyApplication不能满足客户要求的内部库

-----------InnerLibrary aar-------------
public class InnerLibraryTestClass {
}


-----------OutterLibrary aar-------------
public class OutterLibraryTestClass {
    InnerLibraryTestClass innerLibraryTestClass;
}


-----------MyApplication project-------------
public class MyApplicationTestClass {
    OutterLibraryTestClass outterLibraryTestClass;
//    below cause compile error
//    InnerLibraryTestClass innerLibraryTestClass;
}

这可能吗?如果是这样,如何制作文件和结构或访问InnerLibrary类?

例如,如果您在android build gradle中包含'com.android.support:support-v13:+',则可以在support v4使用视图,而无需在build gradle中导入support v4。

这就是我想要的。

谢谢。

下面是githup的示例

https://github.com/woosuk0410/InnerLibrary

https://github.com/woosuk0410/OutterLibrary

https://github.com/woosuk0410/MyApplication

0 个答案:

没有答案
相关问题