Phonegap Build Config.xml格式不正确 [英] Phonegap Build Config.xml Malformed

查看:200
本文介绍了Phonegap Build Config.xml格式不正确的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我添加一个插件到config.xml并上传我的项目,配置显示为格式错误。

If I add a plugin to the config.xml and upload my project, the config appears to be malformed.

<?xml version='1.0' encoding='utf-8'?>
<widget 
id="com.example.app" 
version="0.0.1" 
xmlns="http://www.w3.org/ns/widgets" 
xmlns:cdv="http://cordova.apache.org/ns/1.0"
>
<name>App</name>
<description>
    A sample Apache Cordova application that responds to the deviceready event.
</description>
<author email="dev@cordova.apache.org" href="http://cordova.io">
    Me
</author>
<content src="index.html" />
<access origin="*" />
<preference name="phonegap-version" value="3.0.0" />
<gap:plugin name="org.apache.cordova.file" />

</widget>

phonegap 说明告诉我添加这行到我的config.xml:

The phonegap instructions tell me to add this line into my config.xml:

<gap:plugin name="org.apache.cordova.file" />

每次我尝试上传时,都会变得格式错误。

Everytime I try to upload it, it becomes malformed.

推荐答案

我认为问题可能在于您正在使用

I think the issue may be that you are using

<widget id="com.example.app" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0" >

(因为您使用cordova而不是phonegap创建了项目)

(because you created the project using cordova and not phonegap)

这对于cordova项目是正确的,但可能不是用于phonegap构建项目(而不允许插件)。

which is correct for a cordova project but maybe not for a phonegap build project (and not allow plugins).

尝试使用

<widget id="com.example.app" version="1.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:gap="http://phonegap.com/ns/1.0">

重要的是 xmlns:gap =http://phonegap.com /ns/1.0而不是 xmlns:cdv =http://cordova.apache.org/ns/1.0

这篇关于Phonegap Build Config.xml格式不正确的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆