MobileFirst Platform原生iOS应用程序构建在构建.wlapp时出错

时间:2015-06-02 08:29:30

标签: ios ant ibm-mobilefirst

我正在使用ant脚本在MobileFirst Platform版本7上构建项目.war,.wlapp,.adapter。
一切都很好,而我们的项目是混合项目。现在项目已迁移到原生iOS中。

我正在使用以下代码来构建.wlapp。

<target name="build-wlapp">
<app-builder worklightServerHost="localhost:10080"
applicationFolder="//Users/admin/Documents/workspace/NewProj/apps/Try"
environments="iOSnative"
nativeProjectPrefix="NewProj"
outputFolder="/Users/admin/Documents/workspace/NewProj/bin"/>

它抛出以下错误:

  

build.xml:66:构建应用程序失败:构建不可能   由于application-descriptor.xml无效而完成。(cvc-elt.1:不能   找到元素'nativeIOSApp'的声明。)

我没有得到这个缺陷......

2 个答案:

答案 0 :(得分:0)

假设您在评论中发布的application-descriptor.xml已完成,您的xmlns声明后看起来有一个迷路分号。这不是有效的XML。不确定它是怎么回事(检查您的源代码管理系统?),但您可能需要删除/还原它。

答案 1 :(得分:-1)

抱歉先回答错误答案。

您使用了错误的代码来生成蚂蚁脚本所在的.wlapp文件。

<project default="change"> 

<target name="change"> 
  <taskdef resource="com/worklight/ant/defaults.properties">
            <classpath>
                <pathelement location="worklight-ant-builder.jar"/>
            </classpath>
        </taskdef>   
     <native-app-builder
              sourceFolder="C:\Workspace\Test\apps\Test" DestinationFolder="bin"
              worklightServerHost="http://111.111.111.111:10080">
            </native-app-builder>
</target>
</project>
相关问题