应用程序未部署在黑莓模拟器上

发布于 2024-07-18 04:14:15 字数 256 浏览 5 评论 0原文

我尝试在黑莓模拟器 8100 上部署 .cod、.alx.jar 文件;应用程序未部署在手机上。我正在使用 Eclipse 的黑莓插件。 我该如何解决这个问题?

请帮助


更新

嗨, 感谢您的回复。 我正在尝试按照您建议的方式运行该应用程序。

每次运行任何项目时都需要设置新的运行配置吗?

构建配置的默认值应该是什么? [调试、私有或发布]

I am tried deploying .cod,.alx.jar files on blackberry simulator 8100;the application is not getting deployed on phone.I am using Blackberry plugin for Eclipse.
How can I solve this issue?

Please help


Update

Hi,
Thanks for your reply.
I am trying to run the application the way you suggested.

Do I need to setup new run configuration every time I run any project?

What should be default value for build configuration ? [Debug,Private,or Release]

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(10

冷︶言冷语的世界 2024-07-25 04:14:15

将 .cod 文件复制到模拟器的目录(所有其他 .cod 文件所在的位置)并重新启动模拟器即可。

也许您想从 Eclipse 自动部署。 如果这对您不起作用,则需要检查以下几项:

检查项目是否已针对 BlackBerry 激活 - 从项目的右键单击菜单中,确保选中“为 BlackBerry 激活”。

如果已经选中该选项(默认情况下,当您创建新的 BB 项目时),那么有时显式构建项目就可以解决问题:从“项目”菜单中,选择“构建活动 BlackBerry 模拟”

编辑:为了回应下面的一些评论,我认为其他的东西。 您选择的配置可能与您的问题有关(BlackBerry -> Build Configurations)。 JDE 插件中的配置不会影响生成的代码,但它会影响为 BlackBerry 激活哪些项目。 如果您切换配置,您的项目可能会变得未激活。
由于它不会影响代码,因此我通常只选择一种配置并在整个调试和发布过程中坚持使用它。

Copying the .cod files into the simulator's directory (where all the other .cod files are) and restarting the simulator will work.

Probably though you want to automatically deploy from Eclipse. If this isn't working for you, there are a couple of things to check:

Check that the project has been activated for BlackBerry - from the right-click menu for the project, make sure that Activate For BlackBerry is checked.

If that's already checked (as it is by default when you create a new BB project), then sometimes explicitly building the project will do the trick: From the Project menu, choose Build Active BlackBerry Simulation

EDIT: In response to some comments below I thought of something else. The configuration you choose may have something to do with your problems (BlackBerry -> Build Configurations). The configuration in the JDE Plug-in doesn't affect the code generated, but it does affect which projects are activated for BlackBerry. If you switch configurations, your project may become un-activated.
Since it doesn't affect the code, I usually just pick one configuration and stick with it throughout debugging and release.

独夜无伴 2024-07-25 04:14:15

您的路径中可能缺少“jar”。 如果是这样,Eclipse BB 插件会默默地失败,并且您的应用程序不会被推送到模拟器插件目录。 要在 Eclipse 中查看此失败,请选择“Project >” 构建活跃的黑莓模拟”。

如果您的路径中没有 jar,那么您将看到:

I/O Error: Cannot run program "jar": CreateProcess error=2, The system cannot find the file specified rapc executed for the project

因此,如果您的 JDK 在这里:

C:\Sun\SDK\jdk\bin

然后将其附加到系统环境的 PATH 变量,然后重新运行“构建活动 BlackBerry 模拟”,您应该看到:

rapc executed for the project [YOUR PROJECT]

You might be missing 'jar' in your PATH. If so, the eclipse BB plugin silently fails and your application won't be pushed to your simulator plugin directory. To see this failure within eclipse, choose 'Project > Build Active BlackBerry Simulation'.

If you don't have jar in your path, then you will see:

I/O Error: Cannot run program "jar": CreateProcess error=2, The system cannot find the file specified rapc executed for the project

So, if your JDK is here:

C:\Sun\SDK\jdk\bin

Then append it to your system environment's PATH variable, then re-run 'Build Active BlackBerry Simulation' and you should see:

rapc executed for the project [YOUR PROJECT]
嘴硬脾气大 2024-07-25 04:14:15

这里有一些想法:

1) 如果您有任何构建错误,那么应用程序将不会部署到模拟器。 Eclipse 编译器(用红色强调编译错误)与为模拟器创建二进制文件的“rapc”编译器不同。 我听说过 Eclipse 构建似乎可以工作,但 rapc 编译失败的情况 - 检查控制台以获取详细的 rapc 输出(这可能看起来不像正常的 Eclipse 构建错误)。

2)在Eclipse菜单中,打开BlackBerry -> 配置 BlackBerry Workspace。

在 BlackBerry JDE 下选择代码签名并确保选中三个 RIM 复选框。 当未选择这些时,我遇到了编译错误。

在 BlackBerry JDE 下,选择已安装的组件。 选择使用组件包 4.7.0,因为我听说 4.5.0 模拟器存在问题。

您应该删除您发布的所有这些额外答案,否则您可能会得到否决票 - 它们应该是评论而不是答案。

Here are a couple of ideas:

1) If you have any build errors then the application won't deploy to the Simulator. The Eclipse compiler (that underlines compile errors in red) is different to the "rapc" one that creates the binary for the Simulator. I have heard of situations where the Eclipse build seems to work, but the rapc compile fails - check the Console for the detailed rapc output (this might not look like a normal Eclipse build error).

2) In the Eclipse menu, open BlackBerry -> Configure BlackBerry Workspace.

Under BlackBerry JDE choose Code Signing and make sure the three RIM checkboxes are selected. I had compile errors when these weren't selected.

Under BlackBerry JDE choose Installed Components. Choose to use the Component Package 4.7.0 as I have heard of problems with the 4.5.0 Simulator.

You should delete all these extra answers you posted, or you might get downvotes - they should be comments instead of answers.

背叛残局 2024-07-25 04:14:15

在启动模拟器之前检查您的模拟器是否设置为清理文件系统/配置。 模拟器可以这样设置。 如果您停用它,该应用程序不应消失。

Check if your simulator is set up to clean the file system / configuration before launching the simulator. Simulators can be set up like this. If you deactivate it, the application should not disappear.

踏雪无痕 2024-07-25 04:14:15

对于未来的读者来说,这个问题还有另一种可能性。 检查工作台项目目录(文件夹)中是否有 ProjectName.err 文件。 这可能会提供一个线索,说明为什么您的构建会默默失败并因此无法部署。 就我而言,这是一个“错误!907”,我添加到项目中的新图标太大了。 Eclipse 3.4.1 中绝对没有其他迹象表明我的构建存在问题。

For future readers, there is another possibility for this issue. Check your workbench project directory (folder) for a ProjectName.err file. This may provide a clue as to why your build is silently failing and thus not deploying. In my case, it was an "Error!907", a new icon I added to my project was too big. There was absolutely no other indications in Eclipse 3.4.1 that there was a problem in my build.

三生一梦 2024-07-25 04:14:15

刚刚遇到了同样的问题:项目编译良好,但没有部署在任何设备或任何模拟器上,即使调试器说它已附加!
问题来自于项目 ./src 目录中的 .zip 文件,将其删除或移动到其他位置可以解决此问题。
我希望我没有在这样一个愚蠢的问题上花费 2 个多小时:/

Just ran through the same kind of problem : project compiled fine but didn't deploy on any device or on any simulator, even though the debugger said it was attached !
The problem came from a .zip file that was located in the ./src directory of the project, deleting or moving it somewhere else resolved this case.
I wish I hadn't spend 2+ hours on such a stupid problem :/

你没皮卡萌 2024-07-25 04:14:15

我知道这已经很旧了,但是您还必须右键单击项目菜单来执行“生成 ALX”选项,否则它将无法部署,至少不适合我。

I know this is old, but you have to do the "generate ALX" option from right clicking the project menu as well or it won't deploy, at least it doesn't for me.

独自唱情﹋歌 2024-07-25 04:14:15

我再次遇到同样的问题,这里发布的答案都不适合我。

我玩了一圈,终于成功了。 问题在于输出文件名包含连字符('-')。 在 BlackBerry 应用程序描述符的“构建”部分中更改此名称即可达到目的。

我的意思是,开发人员一定是多么愚蠢才会犯这种错误。 没有报告错误,为什么首先拒绝带有连字符的名称? 把我两个小时的 RIM“开发者”还给我!

I ran into the same problem again and none of answers posted here worked for me.

I played around and finally made it work. The problem was that the output file name contained a hyphen ('-'). Changing this name in the Build section of BlackBerry app descriptor did the trick.

I mean, how stupid a developer must be to slip that kind of bug. No error reported and why reject the names with hyphens in the first place? Give me back my two hours RIM "developers"!

爱的十字路口 2024-07-25 04:14:15

我有同样的问题。 原因是在标题中使用了“ü”字符。

I had the same problem. The reason was using 'ü' character in the title.

榆西 2024-07-25 04:14:15

我今天一直面临这个问题,但是是在 MIDlet 项目中。 结果是我忘记在 BlackBerry 应用程序描述符 (BlackBerry_App_Descriptor.xml) 中指定“主 MIDlet 类的名称”。 一旦我指定它,应用程序就会正确显示在模拟器上。

I have been facing this problem today, but with a MIDlet project. It turned out to be that I forgot to specify the "Name of main MIDlet class" in the BlackBerry Application Descriptor (BlackBerry_App_Descriptor.xml). Once I specified it the application appeared on the simulator correctly.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文