I have an issue that is directly related to this question: How to have two build flavors inherit from a root flavor in Android Studio? but it makes sense to pull it out into another question. I have this in my build.gradle:
flavorGroups 'fruit', 'paid'
productFlavors {
apple {
flavorGroup 'fruit'
}
orange {
flavorGroup 'fruit'
}
free {
flavorGroup 'paid'
}
premium {
flavorGroup 'paid'
}
}
I have four unique applications at this point.
- Apple Free
- Apple Paid
- Orange Free
- Orange Paid
But they do not have unique package names/application ids just yet.
How do I set up four unique app ids/package names in this situation?
What I've tried?
In the previous question @Scott Barta suggested just to set the package names in the manifest for each of the four application.
When I tried creating four additional manifests (Note: I had my single "core" manifest before in /main) I got an error: Manifest merger failed : Main AndroidManifest.xml at AndroidManifest.xml manifest:package attribute is not declared. It seems as though I removed the package name from the core manifest file (in /main) it doesn't want to build.