August 21, 2014
Hot Topics:
RSS RSS feed Download our iPhone app

Creating Android Libraries in Eclipse, Page 2

  • May 8, 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


Tags: Eclipse, Android development

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

Page 2 of 2



Comment and Contribute

 


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

 

 


Sitemap | Contact Us

Rocket Fuel