I have two build types set in my gradle file: debug and release. I\'d like to be able to set a different app icon for the debug build
This is a handy approach although it has an important downside... both launchers will be put into your apk. – Bartek Lipinski
The better way: InsanityOnABun's answer
AndroidManifest.xml
...
build.gradle
android {
...
productFlavors{
Test{
versionName "$defaultConfig.versionName" + ".test"
resValue "string", "app_name", "App-Test"
manifestPlaceholders = [
appIcon: "@mipmap/ic_launcher_test",
appIconRound: "@mipmap/ic_launcher_test_round"
]
}
Product{
resValue "string", "app_name", "App"
manifestPlaceholders = [
appIcon: "@mipmap/ic_launcher",
appIconRound: "@mipmap/ic_launcher_round"
]
}
}
}
the Github url:Build multi-version App with Gradle