Adding product flavor-specific resourcessuggest change
Resources can be added for a specific product flavor.
For this example, assume that we have already defined two product flavors called
paid. In order to add product flavor-specific resources, we create additional resource folders alongside the
main/res folder, which we can then add resources to like usual. For this example, we’ll define a string,
status, for each product flavor:
<resources> <string name="status">Default</string> </resources>
<resources> <string name="status">Free</string> </resources>
<resources> <string name="status">Paid</string> </resources>
The product flavor-specific
status strings will override the value for
status in the
Found a mistake? Have a question or improvement idea? Let me know.
Table Of Contents