As Mark said, resources are going to be an issue.

For code though there's a simple way which would allow you to edit the
shared code on the fly. Create a standard Android project and manually
remove Android nature from its .project file (it you do this from inside
Eclipse it'll all get automatically updated). With this change you'll be
able to treat it as a library and reference its code from other Android
projects.

Cheers,
Max


On 7 May 2010 12:16, Mark Murphy <mmur...@commonsware.com> wrote:

> Ajay wrote:
> > Hi,
> >    I have a set of common code (including .java files and resources) ,
> > which I have to use for two similar applications with different
> > package names (for different vendors). How can I maintain two packages
> > which share the common code without making two copies of the common
> > source?
>
> You can compile the source code into a JAR and have the other projects
> incorporate that JAR file. However, resources are then a problem -- you
> can't use R.layout, R.id, R.string, or similar ways to identify those
> resources.
>
> --
> Mark Murphy (a Commons Guy)
> http://commonsware.com | http://github.com/commonsguy
> http://commonsware.com/blog | http://twitter.com/commonsguy
>
> _Beginning Android 2_ from Apress Now Available!
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com<android-developers%2bunsubscr...@googlegroups.com>
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to