views:

107

answers:

1

I have built an application that I want to use as the foundation for a few other variants. The variants will come from assets / resource files and a unique AndroidManifest.xml. However, I want to be able to leave all the application code alone (modifying the package of all my classes, etc). I'm having a hard time figuring out how to do so.

My first thought was to simply have my main application in its own package, and then specify the specific application package in the manifest. However, this gives me issues with the generated R.java class, since it is generated to be in the main application's package.

Anyone have any thoughts on how to accomplish this? To have a code baseline, and the application variants happen in resources/assets and the manifest?

+3  A: 

You can look at the new Android library project system, which is designed at least in part for your scenario. However, this appears to require Eclipse, which you may or may not be using.

You can also look at the Android Parcel Project for ideas, though that is more designed for reusable components than your specific use case.

CommonsWare