Android Gradle for Android Specifying different application IDs for build types and product flavors

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Extensions
> Step 2: And Like the video. BONUS: You can also share it!


You can specify different application IDs or package names for each buildType or productFlavor using the applicationIdSuffix configuration attribute:

Example of suffixing the applicationId for each buildType:

defaultConfig {
    applicationId ""
    minSdkVersion 17
    targetSdkVersion 23
    versionCode 1
    versionName "1.0"

buildTypes {
    release {
        debuggable false      

    development {
        debuggable true
        applicationIdSuffix ".dev"

    testing {
        debuggable true
        applicationIdSuffix ".qa"

Our resulting applicationIds would now be:

  • for release
  • for development
  • for testing

This can be done for productFlavors as well:

productFlavors {
    free {
        applicationIdSuffix ".free"
    paid {
        applicationIdSuffix ".paid"

The resulting applicationIds would be:

  • for the free flavor
  • for the paid flavor

Got any Android Question?