android 清单可选元数据
android manifest optional meta-data
在编写模块时,有一个开发人员模式选项开关,我想通过项目的 gradle 文件从开发人员那里获得。
所以我在项目的 gradle:
中通过 manifestPlaceholders 得到它
manifestPlaceholders = [DeveloperMode : "false"]
但我想让它成为可选的,这样当我将它从 manifestPlaceholders 中删除时,开发人员就不会遇到此错误:
Manifest merger failed : Attribute meta-data#developer_mode@value at
AndroidManifest.xml requires a placeholder substitution but
no value for is provided.
可以吗?通过任何其他方式?
我想出的解决方案是通过从模块的清单中删除变量来删除占位符要求,然后只从开发人员应用程序的清单文件中读取它,所以现在如果开发人员需要在 gradle 应用程序的文件 he/she 应该实现清单占位符功能。
在编写模块时,有一个开发人员模式选项开关,我想通过项目的 gradle 文件从开发人员那里获得。
所以我在项目的 gradle:
中通过 manifestPlaceholders 得到它manifestPlaceholders = [DeveloperMode : "false"]
但我想让它成为可选的,这样当我将它从 manifestPlaceholders 中删除时,开发人员就不会遇到此错误:
Manifest merger failed : Attribute meta-data#developer_mode@value at AndroidManifest.xml requires a placeholder substitution but no value for is provided.
可以吗?通过任何其他方式?
我想出的解决方案是通过从模块的清单中删除变量来删除占位符要求,然后只从开发人员应用程序的清单文件中读取它,所以现在如果开发人员需要在 gradle 应用程序的文件 he/she 应该实现清单占位符功能。