Difference between Build Type, Flavour, and Build Variant in Android

Build Type

Build Type refers to build and packaging settings like signing configuration for a project. For example, debug and release build types. The debug will use android debug certificate for packaging the APK file. While, release build type will use user-defined release certificate for signing and packaging the APK.

Build types are defined in app’s build.gradle file like this:

    buildTypes {
        debug {
            applicationIdSuffix ".debug"
            debuggable true
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'


A flavor is used to specify custom features, minimum and target API levels, device and API requirements like layout, drawable and custom code (for example, if production code is slightly different than development code). This can help create different white label apps as well. Flavours can vary in adding different features or customizing exisitng features, different icons and resources, different styles and strings etc. A simple example of flavour can be to use the live server url as base url for Retrofit in one flavour while adding mock or testing server url for debugging purposes.

Flavours are defined in app’s build.gradle file like this:

  android {
    flavorDimensions "version"

    productFlavors {
        freeVersion {
            //select the dimension of flavor
            dimension "version"

            //configure applicationId for app published to Play store
            applicationId "com.pcc.flavors.free"

            //Configure this flavor specific app name published in Play Store
            resValue "string", "flavored_app_name", "Free Great App"


        paidVersion {
            dimension "version"
            applicationId "com.pcc.flavors.paid"
            resValue "string", "flavored_app_name", "Paid Great App"

Build Variant

The combination of Build Type and Flavor is known as Build Variant. For example, for above build types (debug and release) and product flavours (free and paid versions), build variants can be freeDebug, freeRelease, paidDebug, paidRelease.

You can view build variants in Android Studio at View -> Tool Windows -> Build Variants. It would be something like this:

If you liked this article, you can read my new articles below:

Wajahat Karim is Pakistan’s first Google Developer Expert in Android. As an experience Android developer, he deeply cares about it and keeps writing and speaking about it. He has written two worldwide 300+ pages books on Android development with more than 100 articles around the internet either on his website or his Medium publications. He is also a passionate contributor in open source and has created many Android libraries used by thousands of developers in their apps worldwide. As active public speaker, he spends lots of time giving talks in conferences and motivating people on Android development. You can find Wajahat most active on Twitter @WajahatKarim where he regularly shares all the good stuff about Android and community building.

Author's picture

Wajahat Karim

🔥 Google Dev Expert (GDE) in Android .
📱 Android Dev. 💻 Open Source Contributor . 📝 Technical Writer . 🎤 Public Speaker

Senior Android Developer

Karachi, Pakistan