Skip to content Skip to sidebar Skip to footer

How Can I Share Resources Between The Different Eclipse Projects, So As To Avoid Duplication?

I have 2 android applications that share 95% of their resources, layouts, strings etc. only a few jpg's are different. How can I share resources between the different Eclipse Andro

Solution 1:

Eclipse provides 2 ways to do it,

  1. Create a library project and include this library projects in two application projects
  2. Create a Shared Source Folder, goto your project properties and in Source tab, you can link a folder which may be in any other project and include all files of those folder as a link, without duplicating them.

Solution 2:

I was having trouble figuring this out as well, and these answers didn't provide enough info for me to get code shared across projects (I'm running Eclipse Indigo SR2), so here's what I did:

Create a Java Project to consume the shared resources, say SharedConsumer Create a Java Project that contains the shared resources, say SharedResources Open Project Properties for SharedConsumer, navigate to Java Build Path, Projects tab Click Add... and select SharedResources.

Resources within SharedResources are now all accessible to SharedConsumer as if they were within SharedConsumer.

Solution 3:

Put all your common resources into a separate jar and use this in your separate projects.

Post a Comment for "How Can I Share Resources Between The Different Eclipse Projects, So As To Avoid Duplication?"