I'm trying out product flavors to merge two android application code base which has different package structures into single code base. Both the flavours have two different android manifest files, which have its own Launcher activity. Both the android manifest files will be very much different, as both the flavor code is entirely different. src
main
bricks
I have added category.DEFAULT intent in the bricks android manifest file.
productFlavors {
cars{
applicationId "com.test.game.cars"
}
bricks{
applicationId "com.test.game.bricks"
}
}
When i try to run carsdebug, it is running fine. But when i try to run bricks, both the cars and bricks apk are getting installed into phone. Is there anyway to install only bricks app alone, when bricks debug is ran?
Because each flavor is merged with main flavor. This problems occurs because of manifest merging. So whenever you choose bricks flavor, one launcher comes from main (that wrongly represents cars) and another launcher comes from bricks.
So what you should do;
Try to keep shared parts of both flavors in main, and create another directory that named cars like bricks.