From the course: Android Studio Essential Training 2020

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Define and manage build variants

Define and manage build variants

From the course: Android Studio Essential Training 2020

Start my 1-month free trial

Define and manage build variants

- [Instructor] The Gradle Build system allows you to generate multiple versions of an application based on a common code base. It does this with the concept of flavor dimensions. A flavor dimension is a particular way to define different versions of the app. And within a flavor dimension you can define multiple product flavors. Let's take a scenario where you want to distribute an app through both the Google Play store and through Amazon. And you want to support in-app purchasing. The SDKs for that feature are completely different on the two platforms. Most of your application might be the same for both platforms, but when you get to in-app purchasing you need to run different code. So you would define a flavor dimension for the App Store and then product flavors for Google and for Amazon. You can do this in code directly in your build.gradle file but Android Studio makes it really easy to do through dialogues,…

Contents