我正在尝试使用Cordova构建安卓应用。但是,在创建项目、添加安卓平台并将其导入到Android Studio后,我遇到了config.xml的一些问题。虽然我没有更改任何内容,但仍然遇到了以下错误:“URI is not registered for xmlns:cdv”。整个XML文件如下:
<?xml version='1.0' encoding='utf-8'?>
<widget id="xxx.xxx.xxx" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<preference name="loglevel" value="DEBUG" />
<feature name="Whitelist">
<param name="android-package" value="org.apache.cordova.whitelist.WhitelistPlugin" />
<param name="onload" value="true" />
</feature>
<allow-intent href="market:*" />
<name>xxxx</name>
<description>
A sample Apache Cordova application that responds to the deviceready event.
</description>
<author email="dev@cordova.apache.org" href="http://cordova.io">
Apache Cordova Team
</author>
<content src="view/index.html" />
<access origin="*" />
<allow-intent href="http://*/*" />
<allow-intent href="https://*/*" />
<allow-intent href="tel:*" />
<allow-intent href="sms:*" />
<allow-intent href="mailto:*" />
<allow-intent href="geo:*" />
<feature name="SplashScreen">
<param name="android-package" value="org.apache.cordova.splashscreen.SplashScreen" />
<param name="onload" value="true" />
</feature>
<platform name="android">
<icon src="res/drawable-ldpi/icon.png" density="ldpi" />
<icon src="res/android-mdpi/icon.png" density="mdpi" />
<icon src="res/android-hdpi/icon.png" density="hdpi" />
<icon src="res/android-xhdpi/icon.png" density="xhdpi" />
</platform>
</widget>