简体   繁体   中英

Android - Gradle dependencies of Library Modules

In Android Studio, I've created an Android Library Module. Said module has its own Gradle file, and I intend to make it as independent from the app that will be using it as possible - that means that the user doesn't have to copy the Library Module's Gradle dependencies into the app module's Gradle dependencies block.

How do I go about doing it? Do I have to search for the .jar files of said dependencies and add them to the Library Module instead of the ordinary compile '<libpackage>:<libname>:<libversion>' lines in Gradle?

You can export this library into aar file and compile this file as library, it will download all inside library dependencies

Export library to AAR here: Create aar file in Android Studio

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