2013-05-31 69 views
0

我正在開發blackberry phonegap application。我已經設置了構建應用程序所需的所有環境。當我構建成功構建的應用程序時,我正在使用命令提示符調試應用程序。但是,當加載設備導致錯誤如下。黑莓Phonegap負載設備顯示錯誤

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> 

任何想法,爲什麼這是happing任何幫助,將不勝感激。

回答

0

很難確定這個信息的問題,但我懷疑你的xml中的「目標名稱」有問題。

如圖所示,確保加載設備在blackberry.xml中正確定位。

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

下載此錯誤使用不正確的部署命令時也會引發此錯誤。 在我的情況下,我試圖部署我的應用程序到一個BB10設備使用螞蟻黑莓負載設備而不是螞蟻qnx負載設備。

下面是從文檔的代碼段:

黑莓10(QNX) - 螞蟻QNX負載設備

黑莓劇本 - 螞蟻劇本負載設備

BlackBerry智能手機(OS5-7) - ant blackberry加載設備

請參閱http://cordova.apache.org/docs/en/2.5.0/guide_getting-started_blackberry_index.md.html