使用 Gradle 實現 debug 與 release 不同 APP 名
於 2020年3月21日 (六) 16:25 由 Silica(對話 | 貢獻) 所做的修訂 (创建页面,内容为“Category:Android 2020-03-22 00:15 == 使用 == <pre> android { ... buildTypes { debug { resValue "string", "app_name", "@string/app_…”)
2020-03-22 00:15
使用
android { ... buildTypes { debug { resValue "string", "app_name", "@string/app_name_debug" ... } release { resValue "string", "app_name", "@string/app_name_release" ... } } }
在 strings.xml 中建立對應的 app_name_debug 和 app_name_release,通過 Gradle 打包出來的 debug 和 release 的同個 APP 就會不同名字。