MobileFirst Platform 本机 iOS 应用程序构建在构建 .wlapp 时出错
MobileFirst Platform native iOS app building have error while building .wlapp
我正在使用 ant 脚本构建项目的 MobileFirst Platform version7。war、.wlapp、.adapter。
当我们的项目是混合项目时,一切都运行良好。现在项目迁移到native-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: Failed building application: The build could not be
completed due to invalid application-descriptor.xml.(cvc-elt.1: Cannot
find the declaration of element 'nativeIOSApp'.)
我不明白缺陷在哪里...
首先对错误的回答表示抱歉。
您使用了错误的代码来生成下面的 ant 脚本的 .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>
假设您在评论中发布的 application-descriptor.xml
是完整的,您的 xmlns
声明后似乎有一个分号。那是无效的 XML。不确定它是怎么变成这样的(检查你的源代码控制系统?),但你可能需要 remove/revert 它。
我正在使用 ant 脚本构建项目的 MobileFirst Platform version7。war、.wlapp、.adapter。
当我们的项目是混合项目时,一切都运行良好。现在项目迁移到native-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: Failed building application: The build could not be completed due to invalid application-descriptor.xml.(cvc-elt.1: Cannot find the declaration of element 'nativeIOSApp'.)
我不明白缺陷在哪里...
首先对错误的回答表示抱歉。
您使用了错误的代码来生成下面的 ant 脚本的 .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>
假设您在评论中发布的 application-descriptor.xml
是完整的,您的 xmlns
声明后似乎有一个分号。那是无效的 XML。不确定它是怎么变成这样的(检查你的源代码控制系统?),但你可能需要 remove/revert 它。