[英]Can I use project libraries in the library project?
I have a main project, it has some libs
(like library-x, library-y, library-z) and a library project. 我有一个主项目,它有一些
libs
(例如library-x,library-y,library-z)和一个库项目。 In the library project I import the same libraries with the same versions of the main project (for example library-x and library-y). 在库项目中,我导入具有相同主项目版本的相同库(例如,library-x和library-y)。
When I compile the project, in my application will it duplicate my libraries or adt
will take only one library if it is the same project? 当我编译项目时,在我的应用程序中它将复制我的库吗?如果是同一项目,则
adt
仅会占用一个库吗?
Is there any way to use the project's libraries in the library project? 在图书馆项目中有什么方法可以使用项目的图书馆吗?
Thank you. 谢谢。
If I understood your question correctly, you can just include your dependencies in the library project and then let the library project export its dependencies. 如果我正确理解了您的问题,则可以将依赖项包括在库项目中,然后让库项目导出其依赖项。 The main project then only includes the library project, but also can access its dependencies.
然后,主项目仅包括库项目,但也可以访问其依赖项。
This can change depending on your development environment, however. 但是,这可能会根据您的开发环境而改变。 With Gradle, for example, you can safely add multiple libraries from Maven and it will automatically remove duplicates.
例如,使用Gradle,您可以安全地从Maven添加多个库,它将自动删除重复项。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.