我已导入现有的worklight项目,但构建它会产生以下错误。请建议
错误
cvc-complex-type.2.4.a:找到无效的内容 元素'用法'。之一 “{“http://www.worklight.com/application-descriptor":shell, “http://www.worklight.com/application-descriptor":mobileDeviceSSO, “http://www.worklight.com/application-descriptor":loginPopupHeight, “http://www.worklight.com/application-descriptor":loginPopupWidth, “http://www.worklight.com/application-descriptor":iphone, “http://www.worklight.com/application-descriptor":android, “http://www.worklight.com/application-descriptor":blackberry, “http://www.worklight.com/application-descriptor":ipad, “http://www.worklight.com/application-descriptor":windowsPhone, “http://www.worklight.com/application-descriptor":mobileWebApp, “http://www.worklight.com/application-descriptor":vista, “http://www.worklight.com/application-descriptor":dashboard, “http://www.worklight.com/application-descriptor":air, “http://www.worklight.com/application-descriptor":igoogle, “http://www.worklight.com/application-descriptor":facebook, “http://www.worklight.com/application-descriptor":embedded, “http://www.worklight.com/application-descriptor":common, “http://www.worklight.com/application-descriptor":worklightServerRootURL, “http://www.worklight.com/application-descriptor":worklightRootURL}” 是 预期。 application-descriptor.xml / TWorklightProj / apps / TApp行 15 XML问题
XML文件
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <application xmlns="http://www.worklight.com/application-descriptor" id="TApp" platformVersion="5.0">
<displayName>TApp</displayName>
<description>TApp</description>
<author>
<name>application's author</name>
<email>application author's e-mail</email>
<homepage>http://mycompany.com</homepage>
<copyright>Copyright My Company</copyright>
</author>
<height>460</height>
<width>320</width>
<mainFile>index.html</mainFile>
<thumbnailImage>common/images/thumbnail.png</thumbnailImage>
<usage requireAuthentication="never"/>
<iphone bundleId="com.ATTApp" version="1.0">
<worklightSettings include="true"/>
<security>
<testAppAuthenticity enabled="false"/>
<encryptWebResources enabled="false"/>
<testWebResourcesChecksum enabled="false" ignoreFileExtensions="png, jpg, jpeg, gif, mp4, mp3"/>
</security>
</iphone>
<android version="1.0">
<worklightSettings include="true"/>
<security>
<testAppAuthenticity enabled="false"/>
<encryptWebResources enabled="false"/>
<testWebResourcesChecksum enabled="false" ignoreFileExtensions="png, jpg, jpeg, gif, mp4, mp3"/>
<publicSigningKey>Replace this text with the public key of the certificate with which you sign the APK. For details see the Worklight Developer's Reference Guide.</publicSigningKey>
</security>
</android>
<mobileWebApp version="1.0"/>
<worklightServerRootURL>http://${local.IPAddress}:8080</worklightServerRootURL> </application>
答案 0 :(得分:0)
看起来你已经升级了Worklight版本,但仍然有旧的application-descriptor.xml文件。 您需要修改文件以符合最新的架构。最基本的解决方案就是擦除这一行。 您也可以在此处查看应用示例 - https://www.ibm.com/developerworks/mobile/worklight/getting-started/