Ok, here's what I did.  Seems to be working now, but someone please
let me know if it will cause problems later.

In my manifest, I specified each activity's full path, rather than a
relative path: ie <activity android:name="com.google.code.Activity">
versus <activity android:name=".Activity">

In my manifest, I have a base package name, this is where the R gets
generated, ie: <manifest package="com.google.code.package">

Then, for each build of the app I create, I modify the package
attribute, ie: <manifest package="com.google.code.package.a">,
<manifest package="com.google.code.package.b">, etc.

This will keep me from needing to modify any source code during my
build.

On Aug 27, 11:27 pm, "Mark Murphy" <mmur...@commonsware.com> wrote:
> > I created the two apk files, however, when trying to install the
> > second application, it fails because it says it's already installed.
> > From what I can tell, it thinks the two applications are the same, my
> > guess is because of the package attribute in the manifest.
>
> Correct.
>
> > I modified the manifest with a different package name, but R is
> > generated based on that package name and that affects the rest of the
> > code.
>
> Correct.
>
> > So, my question is this: What's the process I should be using to
> > install two applications using the same code, but with different names
> > and different strings.xml files?
>
> The process you were using is correct, to the extent there is *any* good
> way of doing what you are trying to do. You will need to script a means of
> altering your source code (or use Eclipse's refactoring tools) to deal
> with the fact that your code and R.java should wind up in some other
> package.
>
> Depending on your code base, it may be worthwhile to package some of it as
> an independent JAR file that the two applications use. Since such JAR
> files cannot reliably reference R.java constants anyway, that JAR file's
> code would not need to change for such a rename process.
>
> --
> Mark Murphy (a Commons Guy)http://commonsware.com
> Android App Developer Books:http://commonsware.com/books.html
--~--~---------~--~----~------------~-------~--~----~
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