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

本文详细介绍了如何下载并安装Ripple模拟器,将PhoneGap项目部署到BlackBerryTorch9800上进行开发,并解决了在使用过程中遇到的问题,包括错误处理和性能优化。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

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

安装Ripple到本地

启动Ripple,选择PhoneGap

修改Device为BlackBerry Torch 9800


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



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

拷贝PhoneGap项目的\www目录下面的所有文件和目录到 C:\Documents and Settings\<user name>\RippleSites\Project1下面

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


在Ripple的上面导航栏目里面输入http://localhost:9900/Project1/index.html

如果需要,重新启动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运行环境,即删除C:\Documents and Settings\<user name>\Application Data\Research In Motion\Ripple\目录下面除config.ini外的其他所有文件和目录。


错误处理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了。不错。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值