简体   繁体   中英

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. In the library project I import the same libraries with the same versions of the main project (for example library-x and 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?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM