Search code examples
androideclipsecomponentsreusability

Reusable Projects in Eclipse/Android


I'm new to development on Eclipse (for Android). I have been a .Net developer using Visual Studio for YEARS now. I'm excited to now try something new.

I have just started working on Eclipse and managed to develop a small database application. I want to build reusable components which I can use across multiple projects. In Visual Studio, I build a new project and "reference" them in other projects. This way changes to the components get reflected in all referencing projects.

Is there a way to do a similar thing in Eclipse? I don't want to include the .java files in my project, rather I want them to be in a separate project. I'm also looking for the best practices to do this in the Eclipse/Java world.


Solution

  • Create a library project for the one you want to reuse.
    https://developer.android.com/studio/tools/sdk/eclipse-adt.html

    Update: Eclipse is not supported now, here are the docs for Android Studio.