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.
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.
Update for Android Studio option
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:
apply plugin: 'com.android.application'
Change the plugin assignment as shown here:
apply plugin: 'com.android.library'
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
Below steps are for Eclipse
Steps are
Right click on project -> property -> Android -> check 'Is library' check box -> OK
That's it.
S.It's possible. For eg: if you take Actionbar sherlock.
https://github.com/JakeWharton/ActionBarSherlock/tree/master/library, it's a library
that has been created . You can import that in properties->Android->library.
Or if you are using a Mac;
Step One. Hold down ctrl and tap on the project. Step Two. Click Property Step Three, Android Step Four, ensure the "Is Library" check box is ticked.