The Frontier logo The Frontier logo
Kristin Marsicano

Build Variants: Product Flavors (part 1)

Kristin Marsicano | Nov 16, 2018

In this series, you will learn how to produce separate APKs from the same code base using product flavors. Each flavor will be branded differently, including a custom launcher icon, color scheme, and app name.

In this video, which is part 1 of the series, you will learn how to:

1. Define product flavors in your gradle file, each with a custom application id
2. Build and install flavored variants

In the next video you will learn how to use the main source set to share java and resource files, and also how to create custom source sets for each flavor to provide custom resource files for each flavored variant.

You can use these same techniques in any scenario where you want to build apps with similar functionality and tweak them slightly, such as having a free and paid version of your application.

Supported Links:

Android Build Variants