“使用 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 条目,不然会打包出错。