Creating Android Libraries in Eclipse, Page 2
Creating Android-Compliant Libraries
You have now successfully added a JAR file, but what if you wanted to create your own library, to share data across several Android projects? In this section, I'll show you how to create an Android Library from an existing Android project, and then leverage that library in a different project. After you have added the library, you will be able to use all of its classes, just as you would the standard Android SDK classes.
- Select the project you wish to share. Open the Project menu and select Properties.
- Now you have marked this project as a library, you can easily reference it from other Android projects. Simply select a new project in Eclipse's Package Explorer and open the Properties dialog from the Project menu.
Select Android from the list and click the Add button.
Select the project you marked as a library, and click the Ok button.
You have now successfully added the library to your project!
Page 2 of 2