赞
踩
我们打包可能有很多buildType,比如正式、测试等,为了快速区分构件类型,需要用显眼的文字或者图标来区分。
1.在app的build.gradle中的buildTypes中添加manifestPlaceholders
- buildTypes {
- release {
- manifestPlaceholders = [
- icon: "@drawable/icon_app_logo",
- name: "@string/app_main_name"
- ]
- }
- debug {
- manifestPlaceholders = [
- icon: "@drawable/icon_app_logo_test",
- name: "@string/app_main_name_test"
- ]
- }
- }
2.manifest中使用
- <application
- android:icon="${icon}"
- android:label="${name}">
- ...
- </application>
赞
踩
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。