Skip to content
Advertisement

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.

Thanks.

Advertisement

Answer

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

Advertisement