phonegap中格式错误的config.xml错误

时间:2017-11-03 08:13:45

标签: android cordova config phonegap-build malformed

我是使用phonegap构建的新手。 所以我尝试通过观看视频来构建。 我采取格式错误的config.wml错误。 我检查了配置文件,但我无法解决问题,有时我会收到另一条错误消息('错误 - 您的软件包有一个无效的文件或目录名。请查看构建日志以查看导致此错误的文件)

如果有人能给我任何建议和帮助,我将感激不尽。



<?xml version="1.0" encoding="UTF-8"?>
<widget xmlns="http://www.w3.org/ns/widgets" xmlns:gap="http://phonegap.com/ns/1.0" xmlns:gap="http://schemas.android.com/apk/res/android"  "http://schemas.android.com/apk/res/android" id="com.razzmatazzist.myapp" version="1.0.0.1">

	<name>AOR</name>
	<description>Adventure of Ruzgar</description>
	<author></author>

	<icon src="icon-128.png" width="128" height="128" />
	<icon src="icon-256.png" width="256" height="256" gap:role="default" />

	<preference name="permissions" value="none"/>
	<preference name="android-targetSdkVersion" value="21" />

	<feature name="http://api.phonegap.com/1.0/network"/>

<plugin name="cordova-build-architecture" spec="https://github.com/MBuchalik/cordova-build-architecture.git#v1.0.1" source="git" />

<gap:config-file platform="android" parent="/manifest" mode="delete"> <uses-permission android:name="android.permission.READ_PHONE_STATE"/> </gap:config-file>

	<preference name="orientation" value="default" />
	<preference name="fullscreen" value="true" />
	<gap:config-file platform="ios" parent="UIStatusBarHidden"><true/></gap:config-file>
	<gap:config-file platform="ios" parent="UIViewControllerBasedStatusBarAppearance"><false/></gap:config-file>
	<plugin name="cordova-plugin-crosswalk-webview" source="npm" />

	<plugin name="cordova-plugin-wkwebview-engine" />
	<plugin name="cordova-plugin-file" />
	<plugin name="cordova-plugin-httpd" />

	<plugin name="cordova-plugin-whitelist" source="npm" />
	<access origin="*" />

	<!-- Optional splash screen image, e.g.: -->
	<!-- <gap:splash src="splash.png" width="1024" height="768" /> -->

</widget>
&#13;
&#13;
&#13;

enter image description here

1 个答案:

答案 0 :(得分:1)

您的Config.xml不正确/有效。请仔细阅读

<?xml version='1.0' encoding='utf-8'?>
<widget id="io.ionic.startewwr" version="0.0.5" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
    <name>AOR</name>
    <description>Adventure of Ruzgar</description>
    <author></author>
    <icon src="icon-128.png" width="128" height="128" />
    <icon src="icon-256.png" width="256" height="256" />
    <preference name="permissions" value="none" />
    <preference name="android-targetSdkVersion" value="21" />
    <feature name="http://api.phonegap.com/1.0/network" />
    <plugin name="cordova-build-architecture" spec="https://github.com/MBuchalik/cordova-build-architecture.git#v1.0.1" source="git" />
    <preference name="orientation" value="default" />
    <preference name="fullscreen" value="true" />
    <plugin name="cordova-plugin-crosswalk-webview" source="npm" />
    <plugin name="cordova-plugin-wkwebview-engine" />
    <plugin name="cordova-plugin-file" />
    <plugin name="cordova-plugin-httpd" />
    <plugin name="cordova-plugin-whitelist" source="npm" />
    <access origin="*" />
</widget>