0

我已经导入了一个现有的 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:

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>
4

1 回答 1

0

看起来您已经升级了 Worklight 版本,但仍有旧的 application-descriptor.xml 文件。您需要修改您的文件以符合最新的架构。最基本的解决方案是删除这条线。您还可以在此处查看应用程序示例 - https://www.ibm.com/developerworks/mobile/worklight/getting-started/

于 2012-11-20T08:35:45.940 回答