使用Ripple测试PhoneGap开发的BlackBerry程序

来源:互联网 发布:java中的泛型通配符 编辑:程序博客网 时间:2024/06/07 23:45

分类: BlackBerry 10 HTML 5 849人阅读 评论(0) 收藏 举报

注:这里只是测试,没谈到打包应用。


下载 BlackBerry WebWorks SDK 2.3.1.5 (下载页面里面选择  Smartphone SDK,300MB)


下载Ripple(44MB,从黑莓官方网站的下载速度还不错,感觉是从2010年开始对中国用户做了下载优化,比如增加针对中国IP的Cache服务器?)

安装Ripple到本地

启动Ripple,选择PhoneGap

修改Device为BlackBerry Torch 9800


修改后,Ripple显示BlackBerry Torch 9800的界面



如果C:\Documents and Settings\<user name>下面没有RippleSites目录,创建一个RippleSites目录

(Windows 7下面是C:\Users\<user name>目录)

macbook需要在 HOME  目录下面创建RippleSites目录

例如  ~/RippleSites或者  /Users/kk/RippleSites


注:缺省Ripple没有为你创建这个目录,造成Ripple 内置的web server不能启动。

当然,你可以不用Ripple的web server,自己搞个apache http server也是可以的。


拷贝PhoneGap项目的\www目录下面的所有文件和目录到 RippleSites\Project1下面

(参考Developing  -> Accessing a project from the file system in Ripple部分内容)


在Ripple的上面导航栏目里面输入http://localhost:9910/Project1/index.html  (BlackBerry 10 sdk)

如果需要,重新启动Ripple

测试PhoneGap sample应用,如图

测试开源应用opath(感谢ffqq!),如图



参考:

BlackBerry HTML5/WebWorks开发者网站


注:

Ripple模拟器支持如下特性:

  • Support for multiple devices, platforms and form factors
  • Emulation of WebWorks and PhoneGap™ APIs
  • Emulation of device sensors such as GPS and Accelerometer
  • Quick web browser like environment without the need to compile your app
  • Web Inspector for debugging, profiling and memory usage tools.
  • Integrates with the BlackBerry WebWorks SDK

错误处理1:Ripple不能启动了,每次启动报错

解决办法:清空Ripple运行环境,即删除目录下面除config.ini外的其他所有文件和目录。

C:\Documents and Settings\<user name>\Application Data\Research In Motion\Ripple

%APPDATA%\Research in Motion\Ripple


错误处理2:Ripple还是不能启动,总是一启动就crash。另外就是Ripple运行真是慢,为啥?!

google一把,搜索内Ripple emulator crash ,发现是说需要修改config.ini里面把enableHardwareAcceleration=1改为enableHardwareAcceleration=0;同时清空Ripple运行环境,即删除C:\Documents and Settings\<user name>\Application Data\Research In Motion\Ripple\目录下面除config.ini外的其他所有文件和目录。

精准google:ripple emulator release notes

再次启动Ripple,嗯,运行快多了,也不大crash了。不错。

原创粉丝点击