Updated 13 November 2017
An Android library can include everything needed to build an app, including source code, resource files, and an Android manifest. However, instead of compiling into an APK that runs on a device, an Android library compiles into an Android Archive (AAR) file that you can use as a dependency for an Android app module.
Add the library to your project in either of the following ways (if you created the library module within the same project, then it’s already there and you can skip this step):
Make sure the library is listed at the top of your settings.gradle
file, as shown here for a library named “my-library-module”:
1 |
include ':app', ':my-library-module' |
Open the app module’s build.gradle
file and add a new line to the dependencies
block as shown in the following snippet:
1 2 3 |
dependencies { compile project(":my-library-module") } |
In this example above, the compile configuration adds the library named my-library-module as a build dependency for the entire app module.
References:-> https://developer.android.com/studio/projects/android-library.html
If you have more details or questions, you can reply to the received confirmation email.
Back to Home
Be the first to comment.