October 17, 2018
Hot Topics:

Creating Android Libraries in Eclipse, Page 2

  • May 9, 2012
  • By Jessica Thornsby
  • Send Email »
  • More Articles »

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.

  1. Select the project you wish to share. Open the Project menu and select Properties.

    Eclipse Android libraries

  2. Select the Android option, and tick the Is Library box.

    Eclipse Android libraries

  3. 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.
  4. Select Android from the list and click the Add button.

    Eclipse Android libraries

  5. Select the project you marked as a library, and click the Ok button.

    Eclipse Android libraries

You have now successfully added the library to your project!

Eclipse Android libraries

Originally published on https://www.developer.com.

Page 2 of 2

Comment and Contribute


(Maximum characters: 1200). You have characters left.



Enterprise Development Update

Don't miss an article. Subscribe to our newsletter below.

By submitting your information, you agree that developer.com may send you developer offers via email, phone and text message, as well as email offers about other products and services that developer believes may be of interest to you. developer will process your information in accordance with the Quinstreet Privacy Policy.


Thanks for your registration, follow us on our social networks to keep up-to-date