.cod 部署到模拟器时出现问题
这是黑莓开发论坛上某个主题的重新发布,但我在那里没有得到任何答案,所以我想我会尝试一下。
我开发了一个名为 Ichabod 的内部库,我们的应用程序之一 Spyder 需要它,该应用程序在 Blackberry 4.5.0 操作系统上运行(我们最初的目标是 8330 设备)。我已经使用 bb-ant-tools 来编译该库(该库位于一个单独的项目中),并将其部署到 C:\Program Files\eclipse\plugins\net.rim.ejde.componentpack4.5.0_4.5.0.21 \组件\模拟器。 Spyder 应用程序在 eclipse 插件中调试得很好(我使用 Galileo 和 1.1.2 版本的 RIM 插件)。
然而今天,我在对代码进行了一些更改(Ichabod 中没有进行任何代码更改)后去调试 Spyder 应用程序,发现应用程序突然找不到 Ichabod 模块。我注意到我的eclipse插件文件夹中现在有一个net.rim.ejde.componentpack4.5.0_4.5.0.28\目录,所以我想也许我在没有意识到的情况下更新了组件包,我调整了Ichabod的目标路径库,并使用 bb-ant-tools 重建它。同样的问题。因此,我尝试从 4.5.0.21 和 4.5.0.28 目录中删除 .cod 和所有关联文件,重新编译 Ichabod 库以部署到这两个位置,发现它适用于 4.5.0.21,但不适用于 4.5.0.28 (它也没有列在“设置”下的模块屏幕中)。
我已经验证 .cod 文件存在于 Components\simulator 文件夹中,但我似乎无法弄清楚为什么模拟器无法识别该文件。
有什么建议吗?
我的 bb-ant-tools build.xml 脚本已附上。
谢谢,
〜斯科特
<taskdef resource="bb-ant-defs.xml" classpath="lib/bb-ant-tools.jar" />
<property name="jdehome" value="C:\Program Files\eclipse\plugins\net.rim.ejde.componentpack4.5.0_4.5.0.28\components" />
<property name="simulator" value="${jdehome}\simulator" />
<property name="bin" value="${jdehome}\bin" />
<target name="deploy" depends="build" description="Builds and Deploys Project (installs to simulator)">
<copy todir="${simulator}" overwrite="true">
<fileset dir="output">
<include name="*.cod" />
<include name="*.debug" />
<include name="*.csl" />
<include name="*.cso" />
</fileset>
</copy>
</target>
<target name="clean" description="Cleans the output directory">
<delete dir="output"/>
<mkdir dir="output"/>
</target>
<target name="build" depends="clean" description="Builds Project">
<rapc jdehome="${jdehome}"
destdir="output"
output="Ichabod"
quiet="false">
<jdp type="library"
title="Ichabod Library"
vendor="My Company"
version="0.3"
description="Ichabod Library for Mobile Applications"
arguments=""
systemmodule="false"
runonstartup="false"
startuptier="7"
ribbonposition="0">
</jdp>
<src>
<fileset dir=".">
<include name="src/**/*.java" />
<!-- <include name="resource/**/*.*" /> -->
</fileset>
</src>
</rapc>
</target>
</project>
This is a re-post of a topic on the Blackberry Development Forums, but I wasn't getting any answers there, so I thought I would try SO.
I have an in-house library that I developed called Ichabod that is required by one of our applications, Spyder, which runs on the Blackberry 4.5.0 operating system (our original target was for 8330 devices). I had everything working with bb-ant-tools to compile the library, which is in a separate project, and deploy it to C:\Program Files\eclipse\plugins\net.rim.ejde.componentpack4.5.0_4.5.0.21\components\simulator. The Spyder application debugged just fine in the eclipse plugin (I am using Galileo with the 1.1.2 version of the RIM plugin).
Today, however, I went to debug the Spyder application after making a couple of changes to the code (no code changes were made in Ichabod), and found that the application couldn't find the Ichabod module all of a sudden. I noticed that there was now a net.rim.ejde.componentpack4.5.0_4.5.0.28\ directory in my eclipse plugins folder, so thinking that perhaps I updated the component packs without realizing it, I adjusted the target path of the Ichabod library, and rebuilt it with bb-ant-tools. Same problem. So, I tried removing the .cod and all associated files from both the 4.5.0.21 and 4.5.0.28 directories, recompiled the Ichabod library to deploy to both locations, and found that it works with 4.5.0.21, but not with 4.5.0.28 (it's not listed in the modules screen under Settings, either).
I have verified that the .cod file is present in the components\simulator folder, but I can't seem to figure out why the simulators don't recognize the file.
Any suggestions?
My bb-ant-tools build.xml script is attached.
Thanks,
~Scott
<taskdef resource="bb-ant-defs.xml" classpath="lib/bb-ant-tools.jar" />
<property name="jdehome" value="C:\Program Files\eclipse\plugins\net.rim.ejde.componentpack4.5.0_4.5.0.28\components" />
<property name="simulator" value="${jdehome}\simulator" />
<property name="bin" value="${jdehome}\bin" />
<target name="deploy" depends="build" description="Builds and Deploys Project (installs to simulator)">
<copy todir="${simulator}" overwrite="true">
<fileset dir="output">
<include name="*.cod" />
<include name="*.debug" />
<include name="*.csl" />
<include name="*.cso" />
</fileset>
</copy>
</target>
<target name="clean" description="Cleans the output directory">
<delete dir="output"/>
<mkdir dir="output"/>
</target>
<target name="build" depends="clean" description="Builds Project">
<rapc jdehome="${jdehome}"
destdir="output"
output="Ichabod"
quiet="false">
<jdp type="library"
title="Ichabod Library"
vendor="My Company"
version="0.3"
description="Ichabod Library for Mobile Applications"
arguments=""
systemmodule="false"
runonstartup="false"
startuptier="7"
ribbonposition="0">
</jdp>
<src>
<fileset dir=".">
<include name="src/**/*.java" />
<!-- <include name="resource/**/*.*" /> -->
</fileset>
</src>
</rapc>
</target>
</project>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
因此,在从 Eclipse 中删除 4.5.0.28 插件并重新安装后,这似乎是造成我麻烦的原因。我不知道这是否与此有关,但我还从 Ichabod 项目的构建路径中删除了 JDE 4.5.0 库(在版本 28 中正确设置),并将其替换为相同的 JDE。
经过所有这些废话后,我的库现在显示在模拟器中。感谢所有看过这篇文章的人。希望这对其他人有帮助。
So it appears, after removing the 4.5.0.28 plugin from Eclipse and reinstalling it, that this was what was causing my troubles. I don't know whether this has anything to do with it, but I also removed the JDE 4.5.0 library (which was correctly set at version 28) from the build path of the Ichabod project and replaced it with the same JDE.
After all of this nonsense, my library now shows up in the simulator. Thanks to all who looked at this. Hopefully this will help someone else.