Could you help me to understand the general concept of building android library and use it in user's application.
So, there is following situation:
In android studio there are following modules:
core
data
drawing
and there is a module
app
with dependencies on above modules.
app.gradle
dependencies {
compile project(':core')
compile project(':data')
compile project(':drawing')
}
so I can run the app from Android Studio.
But I would like to have something like AAR file and include it in any app to be able use it again without creation the same modules.
I'm not very familiar with Gradle so I'm not sure is it possible and how to do it.
Add your AAR or JAR as a dependencyNavigate to File > Project Structure > Dependencies. In the Declared Dependencies tab, click and select Jar Dependency in the dropdown. In the Add Jar/Aar Dependency dialog, first enter the path to your . aar or .
An AAR file contains a software library used for developing Android apps. It is structurally similar to an . APK file (Android Package), but it allows a developer to store a reusable component that can be used across multiple different apps.
From my experience, an AAR is created for each library module.
Generated AAR created during build can be found in "yourmodule\build\outputs\aar". (on Android Studio) You can use these AAR in other projects
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With