在验证我的简单应用程序时,我遇到以下错误:
Description Resource Path Location Type
cvc-complex-type.2.4.a: Invalid content was found starting with element 'engine'. One of '{"http://www.w3.org/ns/widgets":name, "http://www.w3.org/ns/widgets":description, "http://www.w3.org/ns/widgets":icon, "http://www.w3.org/ns/widgets":author, "http://www.w3.org/ns/widgets":license, "http://www.w3.org/ns/widgets":content, "http://www.w3.org/ns/widgets":feature, "http://www.w3.org/ns/widgets":preference, "http://www.w3.org/ns/widgets":access}' is expected. config.xml /csam.test/www line 31 XML Problem
这是我的config.xml文件,它是自动生成的:
<?xml version="1.0" encoding="UTF-8"?>
<widget xmlns="http://www.w3.org/ns/widgets" xmlns:gap="http://phonegap.com/ns/1.0"
id="csam.test" version="1.0.0">
<name>csam test</name>
<description>
Authentication application for CSAM.
</description>
<author href="#" email="">
ZeeSteen
</author>
<content src="index.html" />
<access origin="*" />
<preference name="fullscreen" value="true" />
<preference name="webviewbounce" value="true" />
<feature name="App">
<param name="android-package" value="org.apache.cordova.App" />
</feature>
<feature name="BarcodeScanner">
<param name="android-package" value="com.phonegap.plugins.barcodescanner.BarcodeScanner" />
<param name="ios-package" value="CDVBarcodeScanner" />
<param name="wp-package" value="BarcodeScanner" />
<param name="id" value="cordova-plugin-barcodescanner" />
</feature>
<engine name="android" version="4.0.2"/></widget>
现在这一切都是由Eclipse / Cordova本身生成的,我不太确定如何解决这个问题。我确保Android 4.0.2引擎已正确安装。