更新时间:2022-12-28 18:20:33
确保已安装cordova-custom -config插件(cordova插件添加cordova-custom-config)
Make sure you have installed the cordova-custom-config plugin (cordova plugin add cordova-custom-config)
确保添加了Android命名空间属性
Make sure you have added the Android namespace attribute
从文档中:为了在config.xml中的首选项中使用android:namespace,您必须在根< widget> $ c $中包含android命名空间属性c>元素。命名空间属性片段是:
From the documentation : In order to user the android: namespace in preferences within your config.xml, you must include the android namespace attribute on the root <widget>
element. The namespace attribute fragment is:
xmlns:android="http://schemas.android.com/apk/res/android"
确保已定义< config-file target =AndroidManifest.xmlparent =/ *>
android平台元素内的元素(< platform name =android>
),否则将被忽略。
Make sure you have defined <config-file target="AndroidManifest.xml" parent="/*">
element inside the android platform element (<platform name="android">
), otherwise it will be ignored.