「使用 Gradle 实现 debug 与 release 不同 APP 名」修訂間的差異
跳至導覽
跳至搜尋
(创建页面,内容为“Category:Android 2020-03-22 00:15 == 使用 == <pre> android { ... buildTypes { debug { resValue "string", "app_name", "@string/app_…”) |
|||
行 8: | 行 8: | ||
buildTypes { | buildTypes { | ||
debug { | debug { | ||
resValue "string", "app_name", " | resValue "string", "app_name", "APP Debug Version" | ||
... | ... | ||
} | } | ||
release { | release { | ||
resValue "string", "app_name", " | resValue "string", "app_name", "APP Release Version" | ||
... | ... | ||
} | } | ||
行 19: | 行 19: | ||
</pre> | </pre> | ||
在 strings.xml 中 | 注意,记得 在 strings.xml 中 注释掉原有 的 app_name 条目 , 不然会 打包出 错 。<br> |
於 2020年3月21日 (六) 16:34 的最新修訂
2020-03-22 00:15
使用
android { ... buildTypes { debug { resValue "string", "app_name", "APP Debug Version" ... } release { resValue "string", "app_name", "APP Release Version" ... } } }
注意,記得在 strings.xml 中注釋掉原有的 app_name 條目,不然會打包出錯。