Blackberry Phonegap加载设备显示错误

时间:2013-05-31 11:54:01

标签: blackberry cordova

我正在开发blackberry phonegap application。我已经设置了构建应用程序所需的所有环境。当我构建成功构建的应用程序时,我正在使用命令提示符来调试应用程序。但是在加载设备时会导致错误,如下所示。

C:\bbtest>ant blackberry load-device
Buildfile: C:\bbtest\build.xml

blackberry:

load-device:

generate-cod-name:
     [echo] Generated name: cordovaExample.cod

clean:
   [delete] Deleting directory C:\bbtest\build

package-app:
    [mkdir] Created dir: C:\bbtest\build\widget
     [copy] Copying 24 files to C:\bbtest\build\widget
      [zip] Building zip: C:\bbtest\build\cordovaExample.zip

load-device:
     [exec] [INFO]                      Parsing command line options
     [exec] [INFO]                      Parsing bbwp.properties
     [exec] [INFO]                      Validating application archive
     [exec] [INFO]                      Parsing config.xml
     [exec] [INFO]                      Populating application source
     [exec] [INFO]                      Compiling BlackBerry WebWorks applicatio
n
     [exec] [INFO]                      Starting signing tool
     [exec] [INFO]                      Signing complete
     [exec] [INFO]                      Generating output files
     [exec] [INFO]                      BlackBerry WebWorks application packagin
g complete
     [exec] RIM Wireless Handheld Java Loader
     [exec] Copyright 2001-2009 Research In Motion Limited
     [exec] Connecting to device...debug: HRESULT error during Open: 80040154
     [exec] Error: unable to open port

BUILD FAILED
C:\bbtest\build.xml:49: The following error occurred while executing this line:
C:\bbtest\blackberry.xml:53: exec returned: 3

Total time: 53 seconds

C:\bbtest>

任何想法,为什么这会有任何帮助,我们将不胜感激。

3 个答案:

答案 0 :(得分:0)

很难确定这些信息的问题,但我怀疑你的xml中有“目标名称”的问题。

确保在blackberry.xml中正确定位了load-device,如图所示。

<target name="load-device" depends="package-app">
        <bbwp code-sign="true" />
        <exec executable="${javaloader}" dir="." failonerror="true">
            <arg value="-u" />
            <arg value="-w${properties.blackberry.sim.password}" />
            <arg value="load" />
            <arg file="${build.dir}/StandardInstall/${cod.name}.cod" />
        </exec>
    </target>

还要确保在project.properties中正确设置了目录。

blackberry.bbwp.dir=C:\\TheBlackBerryWebWorksSDK
blackberry.sim.dir=C:\\TheEclipseBlackBerry\\plugins\\net.rim.ejde.componentpack5.0.0_5.0.0.25\\components\\simulator
blackberry.mds.dir=C:\\TheBlackBerryWebWorksSDK\\mds

答案 1 :(得分:0)

我认为您可能没有安装BlackBerry Desktop Manager。您可以从http://uk.blackberry.com/software/desktop/desktop-pc.html

下载

答案 2 :(得分:0)

使用错误的部署命令时也会抛出此错误。 在我的情况下,我尝试使用 ant blackberry load-device 而不是 ant qnx load-device将我的应用程序部署到BB10设备。

以下是文档中的摘录:

BlackBerry 10(QNX) - ant qnx load-device

BlackBerry PlayBook - ant playbook load-device

BlackBerry Smartphone(OS5-7) - ant blackberry load-device

请参阅http://cordova.apache.org/docs/en/2.5.0/guide_getting-started_blackberry_index.md.html