cordova 百度key安装失败

隗驰
2023-12-01

旧版本

<plugin name="cordova-plugin-baidumaplocation" spec="https://github.com/liuyafeis/cordova-plugin-baidumaplocation">
        <variable name="ANDROID_KEY" value="key" />
        <variable name="IOS_KEY" value="&lt;API_KEY_IOS&gt;" />
        <variable name="IOS_LOCATION_DESC" value="请点击'好'以允许访问。" />
    </plugin>

新版本

<plugin name="cordova-plugin-baidumaplocation" xmlns="https://github.com/liuyafeis/cordova-plugin-baidumaplocation">
        <variable name="ANDROID_KEY" value="key" />
        <variable name="IOS_KEY" value="&lt;API_KEY_IOS&gt;" />
        <variable name="IOS_LOCATION_DESC" value="请点击'好'以允许访问。" />
    </plugin>

差别

细心地小朋友发现了

spec  =>>  xmlns

官网

<?xml version="1.0" encoding="UTF-8"?>
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
        id="cordova-plugin-device" version="0.2.3">
    <name>Device</name>
    <description>Cordova Device Plugin</description>
    <license>Apache 2.0</license>
    <keywords>cordova,device</keywords>
    <js-module src="www/device.js" name="device">
        <clobbers target="device" />
    </js-module>
    <platform name="ios">
        <config-file target="config.xml" parent="/*">
            <feature name="Device">
                <param name="ios-package" value="CDVDevice"/>
            </feature>
        </config-file>
        <header-file src="src/ios/CDVDevice.h" />
        <source-file src="src/ios/CDVDevice.m" />
    </platform>
</plugin>
    ```
 类似资料: