如何在Eclipse中设置BlackBerry Phonegap项目--MyApp.java来加载index.html?
问题: 如何在 Eclipse 中正确初始化 BlackBerry 的 PhoneGap 项目?
详细信息: 我已将项目文件添加到新的 Eclipse BlackBerry 项目中并将 Phonegap lib 添加到构建路径中,但是我似乎无法弄清楚如何将 MyApp.java 连接到 index.html 以将项目作为 Phonegap/Web 应用程序运行。
设置:我相信我已经满足了所有先决条件:Java JDK/JRE、Eclipse、BlackBerry WebWorks SDK、BB WW SDK 插件以及适用于 Eclipse 的 JRE、phonegap 库和应用程序。文件和我的项目文件。我创建了一个新的 BlackBerry 项目并向其中添加了我的文件并配置了构建路径。
背景:我已经为 iOS 和 Android 开发了多个应用程序,一位客户要求我为 BlackBerry 开发一个应用程序(使用phonegap/callback)。我在 Android 版 Eclipse 中使用了phonegap,没有出现任何问题,但在为 BlackBerry 正确设置它时却遇到了麻烦。
研究:在过去的两天里,我浏览了 stackoverflow、phonegap wiki、黑莓论坛以及 google 可以带我去的所有地方,但我找不到任何相关或有帮助的内容。黑莓最近似乎改变了他们的开发工具和/或 SDK 和插件。大多数看似有用的教程都涉及不再可用的 BlackBerry Eclipse 插件(该插件允许创建“BlackBerry Widget”项目)。我在 BlackBerry 网站上发现了许多指向其他网站和/或引用的页面的链接,但仅导致 404。我已经用过黑莓手机了!
预先感谢您提供的任何帮助。
Question: How does one properly initialize a phonegap project for BlackBerry in Eclipse?
Details: I have my project files added to the new Eclipse BlackBerry Project and added the Phonegap lib to the build paths, however I cannot seem to figure out how to connect the MyApp.java to the index.html to run the project as a phonegap/web app.
Setup: I believe I have all of the pre-reqs taken care of: Java JDK/JRE, Eclipse, BlackBerry WebWorks SDK, BB WW SDK plug-in and JRE's for Eclipse, phonegap libs & files, and my project files. I have created a new BlackBerry project and added my files to it and configured the build path.
Background: I have developed several apps for iOS and Android already and a client has asked me to develop one for BlackBerry (using phonegap/callback). I've used phonegap with Eclipse for Android without any problems, but I am having a heck of a time getting it setup properly for BlackBerry.
Research: I have spent the past 2 days looking all over stackoverflow, phonegap wiki, blackberry forums, and everywhere google could take me and I cannot find anything relevant or helpful. It seems BlackBerry has recently changed their development tools and/or SDK and plugins. Most of the tutorials that would seem helpful refer to a BlackBerry Eclipse plug-in that is no longer available (which would allow one to create "BlackBerry Widget" projects). I have found numerous links to pages on BlackBerry's website that others site and/or refer to but only result in 404's. I've about had it with BlackBerry!
Thanks in advance for any help you may offer.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
好的终于找到了一个可行的答案。
现在 PhoneGap(或更确切地说“Callback”,因为它现在被称为)已经更新到版本 1.2,他们终于更新了他们的文档。他们的 wiki 上有一个指南,其中包含配置 eclipse 来构建 PhoneGap/Callback 的 BlackBerry 项目的最新信息。
以下是指南(请注意,这是针对 BB OS 4.*): http://wiki.phonegap.com/w/page/25653281/Getting%20Started%20with%20PhoneGap-BlackBerry%20with%20the%20Latest%20Environment
(我打印了一份 PDF 副本以防万一...由于某种原因,许多与 BlackBerry 相关的链接/指南似乎消失了)
此外,您不能再使用以下方式为 BlackBerry 构建phonegap 项目BB OS 5.0+ 的 Eclipse(当然,除非您在 Eclipse 中仍然安装了旧插件,该插件自 2011 年 10 月 18 日起就无法安装/更新)
我能找到的为 BB OS 5.0+ 制作 PhoneGap BlackBerry 项目的唯一方法在这里:http://wiki.phonegap.com/w/page /31930982/Getting%20Started%20with%20PhoneGap%20BlackBerry%20WebWorks(忽略关于 Eclipse 的最后一部分,因为它已经过时了)
OK Finally found a workable Answer.
Now that PhoneGap (or rather "Callback" as it is now called) has updated to version 1.2 they finally updated their documentation. They have a guide on their wiki that has new and current info to configure eclipse to build BlackBerry projects for PhoneGap/Callback.
Here is the guide (note this is for BB OS 4.*): http://wiki.phonegap.com/w/page/25653281/Getting%20Started%20with%20PhoneGap-BlackBerry%20with%20the%20Latest%20Environment
(I printed a copy to PDF just in case... For some reason a lot of BlackBerry related links/guides seem to disappear)
Also, you can no longer build phonegap projects for BlackBerry using Eclipse for BB OS 5.0+ (unless of course you have the old plugin still installed in Eclipse, which has been unavailable for install/update since October 18, 2011)
The only way I can find to make PhoneGap BlackBerry projects for BB OS 5.0+ Is here: http://wiki.phonegap.com/w/page/31930982/Getting%20Started%20with%20PhoneGap%20BlackBerry%20WebWorks (ignore the last part about Eclipse as it's out dated)
安装 BlackBerry Java Plug-in 1.3.0
BB WebWorks 更新站点:http://www.blackberry.com/go/eclipseUpdate/3.6/web
打开config.xml 并在前台起始页选项中将您的 url 提供给 index.html 页面
构建、签名并运行。
享受。
Install BlackBerry Java Plug-in 1.3.0
BB WebWorks update site : http://www.blackberry.com/go/eclipseUpdate/3.6/web
Create a project and the structure should look like this
Open config.xml and give your url to index.html page in foreground start page option
Build, sign and run.
Enjoy.