ios - XML 错误 : Unquoted attribute value

标签 ios xml cordova ionic-framework config

每当我运行 ionic cordova build ios命令我收到以下错误

screen shot of the error

我已经转到文本行,它声明具有未引用的属性值,并且似乎没有什么不寻常的地方。

<platform name="ios">
    <allow-intent href="itms:*" />
    <allow-intent href="itms-apps:*" />
    <icon height="57" src="resources/ios/icon/icon.png" width="57" />
    <icon height="114" src="resources/ios/icon/icon@2x.png" width="114" />
    <icon height="40" src="resources/ios/icon/icon-40.png" width="40" />
    <icon height="80" src="resources/ios/icon/icon-40@2x.png" width="80" />
    <icon height="120" src="resources/ios/icon/icon-40@3x.png" width="120" />
    <icon height="50" src="resources/ios/icon/icon-50.png" width="50" />
    <icon height="100" src="resources/ios/icon/icon-50@2x.png" width="100" />
    <icon height="60" src="resources/ios/icon/icon-60.png" width="60" />
    <icon height="120" src="resources/ios/icon/icon-60@2x.png" width="120" />
    <icon height="180" src="resources/ios/icon/icon-60@3x.png" width="180" />
    <icon height="72" src="resources/ios/icon/icon-72.png" width="72" />
    <icon height="144" src="resources/ios/icon/icon-72@2x.png" width="144" />
    <icon height="76" src="resources/ios/icon/icon-76.png" width="76" />
    <icon height="152" src="resources/ios/icon/icon-76@2x.png" width="152" />
    <icon height="167" src="resources/ios/icon/icon-83.5@2x.png" width="167" />
    <icon height="29" src="resources/ios/icon/icon-small.png" width="29" />
    <icon height="58" src="resources/ios/icon/icon-small@2x.png" width="58" />
    <icon height="87" src="resources/ios/icon/icon-small@3x.png" width="87" />
    <splash height="1136" src="resources/ios/splash/Default-568h@2x~iphone.png" width="640" />
    <splash height="1334" src="resources/ios/splash/Default-667h.png" width="750" />
    <splash height="2208" src="resources/ios/splash/Default-736h.png" width="1242" />
    <splash height="1242" src="resources/ios/splash/Default-Landscape-736h.png" width="2208" />
    <splash height="1536" src="resources/ios/splash/Default-Landscape@2x~ipad.png" width="2048" />
    <splash height="2048" src="resources/ios/splash/Default-Landscape@~ipadpro.png" width="2732" />
    <splash height="768" src="resources/ios/splash/Default-Landscape~ipad.png" width="1024" />
    <splash height="2048" src="resources/ios/splash/Default-Portrait@2x~ipad.png" width="1536" />
    <splash height="2732" src="resources/ios/splash/Default-Portrait@~ipadpro.png" width="2048" />
    <splash height="1024" src="resources/ios/splash/Default-Portrait~ipad.png" width="768" />
    <splash height="960" src="resources/ios/splash/Default@2x~iphone.png" width="640" />
    <splash height="480" src="resources/ios/splash/Default~iphone.png" width="320" />
    <icon height="1024" src="resources/ios/icon/icon-1024.png" width="1024" />
    <splash height="2732" src="resources/ios/splash/Default@2x~universal~anyany.png" width="2732" />

最佳答案

platform 添加结束标记后,您发布的 XML 格式正确。 .

我们只能猜测,因为您没有包含文档的错误部分,但您可能在属性值方面犯了以下错误之一:

  • 省略(单引号或双引号)。
  • 使用弯引号 /而不是直接引用" .
  • 使用了一个弯撇号 /而不是直撇号' .
  • 关于ios - XML 错误 : Unquoted attribute value,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51988342/

    相关文章:

    ios - CoreBluetooth 不缓存发现的服务和特征

    java - 使用 Jackson 将 Java 列表序列化为 XML 和 JSON

    javascript - 如何每天在特定时间在cordova中设置本地通知

    cordova - Ionic 2 Native Linkedin 未满足的对等依赖性

    html - 如何使 html 下拉列表在 ios web 应用程序中始终显示为滚动菜单?

    ios - 向 NSMutableArray 添加数据

    iphone - TableView 中图像的大小不正确

    ios - 使用非自数据源和委托(delegate)以编程方式创建 UITableView

    Python XML 比较树

    php - 使用php将XML数据插入mysql