How to create your own library for Android development to be used in every program you write?



I am a Delphi programmer and have written, over the years, hundreds of classes and routines which I can use in every Delphi program I write.

This library is called dlib and can be used in every Delphi program by putting this folder in my library path and using one of the units in the uses section of a Delphi unit.

Being completely new to Java and Android development, I am wondering how to do this in similar way.

So my question, how can I write own classes, put them in some global folder, and use these classes and routines in every Android program I write ?

I know this is a basic question, which I can probably find out by searching Google and trying it out in Eclipse, but if someone can put me on the right track, I know I will save much time.



You have to create Android Library Project.
Create android project in Eclipse, enter Project Properties -> Android and check isLibrary property. Now you can add this library to your Android Application project by adding it to list on the same property page.

More detailed instructions here in Working with Library Projects section

Answered By – Denis Palnitsky

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave A Reply

Your email address will not be published.

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More