In my experience, a complete package rename in all your classes is not
necessary. You do need to change the "package" attribute in the
"manifest" tag in your manifest file. We use an ant filter to do this
in our build script. In this manifest file, use absolute fully
qualified classnames (not starting with '.') for any class references
(like activity classes service classes, etc.).

You can also use this technique to change the "label" attribute in you
"manifest" tag, giving each version a unique name.

I think that is about it. We used this technique to deploy three
versions of "SpecTrek": ADC2, Full, and Light. Sofar without any
problems ;-)

On Sep 4, 3:42 am, Chris Stratton <cs07...@gmail.com> wrote:
> > > I want to use the same eclipse project to maintain only one source
> > > code (or two projects that refer to a generic project).
> > > My problem is that the names of the package have to be different on
> > > the market (eg: my.android.app.lite and my.android.app.pro).
> >http://dev.bostone.us/2009/05/02/android-how-to-deploy-multiple-versi...
>
> > this may help you.
>
> If that's the stock solution, then I do vote for sed... was holding
> out hoping there'd be some kind of magic possible with eclipse or ant.
>
> At any rate, what will work and is ugly but entirely script-able:
>
> copy the project tree
> cd to the top level of the copy
> sed -i "s/my\.android\.app\.pro/my.android.app.lite/g" `find . -type
> f`
> mv src/my/android/app/pro src/my/android/app/lite
> +flip whatever switch reduces the functionality
> rebuild (the above probably will not have fixed an eclipse project...
> that may still need adjustment)
>
> In terms of cleaner solutions... the file base/build/jarjar-rules.txt
> in the android sources seems to be an instruction to *something* to
> rename a collection of packages at build time, but I don't know what
> it instructs
--~--~---------~--~----~------------~-------~--~----~
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