I want to convert an android project into a library project.
Can this be done?
I am trying to use this project in another project.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Convert an app module to a library module
If you have an existing app module with all the code you want to reuse, you can turn it into a library module as follows:
Open the build.gradle file for the existing app module. At the top, you should see the following:
Change the plugin assignment as shown here:
Click
Sync Project with Gradle Files.That’s it. The entire structure of the module remains the same, but it now operates as an Android library and the build will now create an AAR file instead of an APK
Read more about how to Create an Android Library and how to Convert existing project to library project in Android Studio
Steps are
That’s it.