PhoneGap(Cordova)+ BlackBerry 10 QNX构建Ant问题

时间:2012-11-25 12:23:05

标签: cordova blackberry-webworks blackberry-10

我在为BlackBerry平台构建应用程序方面经验丰富,目前正在尝试使用 PhoneGap(Cordova)部署带有BlackBerry WebWorks的示例应用程序,用于 BlackBerry 10 Beta(QNX)< / strong>没有太大的成功。我按照他们PhoneGap Getting Started Guide for BlackBerry链接的developer blog指南中的说明进行操作。

在上述指南的第六步,我遇到了一些无法找到 org.apache.cordova 功能的问题,以及所有 blackberry。* 功能:

D:\Work\Development\PhoneGap\workspace\sample>ant qnx build
Buildfile: D:\Work\Development\PhoneGap\workspace\sample\build.xml

qnx:

build:

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

clean:
   [delete] Deleting directory D:\Work\Development\PhoneGap\workspace\sample\build

package-app:
    [mkdir] Created dir: D:\Work\Development\PhoneGap\workspace\sample\build\widget
     [copy] Copying 24 files to D:\Work\Development\PhoneGap\workspace\sample\build\widget
     [copy] Copying 1 file to D:\Work\Development\PhoneGap\workspace\sample\build\widget
     [copy] Copying 1 file to D:\Work\Development\PhoneGap\workspace\sample\www\js
      [zip] Building zip: D:\Work\Development\PhoneGap\workspace\sample\build\cordovaExample.zip

build:
     [exec]
     [exec] D:\Work\Development\PhoneGap\workspace\sample>"C:\Program Files\Research In Motion\BlackBerry 10 WebWorks SDK 1.0.2.9\dependencies\node\node.exe" "C
:\Program Files\Research In Motion\BlackBerry 10 WebWorks SDK 1.0.2.9\lib\bbwp.js" D:\Work\Development\PhoneGap\workspace\sample\build\cordovaExample.zip -o D:\
Work\Development\PhoneGap\workspace\sample\build
     [exec] [INFO]    Populating application source
     [exec] [INFO]    Parsing config.xml
     [exec] [WARN]    Build ID set in config.xml [version], but no signing password was provided [-g]. Bar will be unsigned
     [exec] [WARN]    Failed to find feature with id: org.apache.cordova
     [exec] [WARN]    Failed to find feature with id: blackberry.find
     [exec] [WARN]    Failed to find feature with id: blackberry.identity.phone
     [exec] [WARN]    Failed to find feature with id: blackberry.pim.Address
     [exec] [WARN]    Failed to find feature with id: blackberry.pim.Contact
     [exec] [WARN]    Failed to find feature with id: blackberry.io.file
     [exec] [WARN]    Failed to find feature with id: blackberry.utils
     [exec] [WARN]    Failed to find feature with id: blackberry.io.dir
     [exec] [WARN]    Failed to find feature with id: blackberry.app.event
     [exec] [WARN]    Failed to find feature with id: blackberry.system.event
     [exec] [WARN]    Failed to find feature with id: blackberry.widgetcache
     [exec] [WARN]    Failed to find feature with id: blackberry.media.camera
     [exec] [WARN]    Failed to find feature with id: blackberry.media.microphone
     [exec] [INFO]    Generating output files
     [exec] [INFO]    Info: Package created: D:\Work\Development\PhoneGap\workspace\sample\build\simulator\cordovaExample.bar
     [exec] [INFO]    Info: Package created: D:\Work\Development\PhoneGap\workspace\sample\build\device\cordovaExample.bar
     [exec] [INFO]    BAR packaging complete

BUILD SUCCESSFUL
Total time: 8 seconds

D:\Work\Development\PhoneGap\workspace\sample>

请注意,找不到 org.apache.cordova 功能,以及所有 blackberry。* 功能。

忽略警告并部署到BB10模拟器会导致此错误:i.imgur.com/aUcPM.png

应该注意的是,在部署PlayBook而不是BlackBerry 10时,没有上述警告或执行时出现错误。

如果有任何指导可以帮助解决这个问题,将不胜感激。

非常感谢。

2 个答案:

答案 0 :(得分:3)

似乎可以忽略这些警告,因为它成功打包了条形文件。 BlackBerry 7.0及更低版本似乎只需要黑莓。*无法找到的功能。如果部署仅针对BB10,那么从config.xml中删除那些blackberry。*功能应该是安全的,但如果它也将被部署到较低版本,则最好保留它。

至于行org.apache.cordova,官方论坛上的一张海报说:

  

我认为WebWorks打包程序试图在WebWorks SDK文件夹中找到org.apache.cordova将其复制到bar文件中,而实际上org.apache.cordova已经存在于你的www文件夹中,该文件夹也被复制到酒吧档案。 (尽管我仍然认为在设备上访问Cordova API仍然需要这一行)

答案 1 :(得分:0)

您看到警告的原因是因为BlackBerry 10不支持某些'blackberry。*'API,所以它只是跳过它们。我相信这与您的屏幕截图无关。

您是如何准确访问联系人的,您是否有任何示例代码?