I am trying to figure out a way to be able to change my application\'s app name per build type in gradle.
For instance, I would like the debug version to have
We need a solution to support app name with localization (for multi language). I have tested with @Nick Unuchek solution, but building is failed (not found @string/) . a little bit change to fix this bug: build.gradle file:
android {
ext{
APP_NAME = "@string/app_name_default"
APP_NAME_DEV = "@string/app_name_dev"
}
productFlavors{
prod{
manifestPlaceholders = [ applicationLabel: APP_NAME]
}
dev{
manifestPlaceholders = [ applicationLabel: APP_NAME_DEV ]
}
}
values\strings.xml:
AAA prod
AAA dev
values-en\strings.xml:
AAA prod en
AAA dev en
Manifest.xml: