views:

21

answers:

1

This question is related to this one. I have two Android projects inside Eclipse. One activity of one project calls an activity of the other project. This results in two independent applications being deployed on Android phone.

Is there any way to merge at build time (inside or outside Eclipse) both applications in only one so only an APK is generated?

+1  A: 

You can declare one of the projects as a library and include it's activities in the other. Eclipse will take care of merging the code, resources, and apk's. See this for more details.

Erich Douglass
You seem to be right, but I get the following error in Eclipse:[2010-08-31 15:02:54 - TestAndroidModularApplication] ERROR: Unknown option '--auto-add-overlay'
Fernando Miguélez
Make sure you have the most recent version of the Android Tools plugin. Also, after I created a library and linked another project to it, I had to restart Eclipse before it would recognize the link.
Erich Douglass
You are right. I updated to last SDK Tools (R6) and it worked. This functionality is rather new. Next step to ask Google is to let develop from compiled binaries (jars or apks) instead from plain sources.
Fernando Miguélez