Adding product flavor-specific resources
suggest changeResources can be added for a specific product flavor.
For this example, assume that two product flavors, free and paid, are already defined. Flavor-specific resources live in source sets next to main. This example defines a status string for each flavor.
src/main/res/values/strings.xml
<resources>
<string name="status">Default</string>
</resources>
src/free/res/values/strings.xml
<resources>
<string name="status">Free</string>
</resources>
src/paid/res/values/strings.xml
<resources>
<string name="status">Paid</string>
</resources>
The flavor-specific status strings override the value from the main source set.
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents