android { defaultConfig { applicationId = "com.nek.example" //be sure to follow the same order as here, or the id will be "null" buildConfigField("String", "APPLICATION_ID_DEFAULT", "\"${android.defaultConfig.applicationId}\"") //... } } buildTypes { getByName("debug") { applicationIdSuffix(".debug") //... } }