Eve开发者_高级运维rytime I run the bb simulator on my Eclipse, it always gives me "Packaging Project Failed" and my project sometimes does show up in the downloads on the blackberry simulator (even it is failed in the packaging), but most of the time, it says "Module cannot be found" or it isn't loaded to the simulator.
What is the cause of this problem and how do I fix it? Thanks.
I am using 9700 simulator with OS 5.
There are a few possibilities that might causes this. Here are a few thing that have helped me diagnose and fix these issues in the past:
- Look in the project directory in your eclipse workspace and see if there are any *.err files. Sometimes compilation will fail, but it will not tell you that it failed, and will instead log an error message to these files and give errors similar to the ones you are seeing. The *.err file will contain more information about the specific error that occurred.
- Try resetting the blackberry simulator (go to /plugins/net.rim.ejde.componentpack/components/simulator, and run 'clean.bat'). Sometimes the simulator gets into a weird state where it has trouble communicating with eclipse
- Clean and rebuild the project in eclipse. This is similar to the last point, but cleans the other side of the eclipse<->simulator communication.
- If you have created any classes that implement Persistable, ensure that they do not have any fields whose class does not implement Persistable. This will prevent the code from compiling and/or running, but the blackberry plugin will not tell you that anything went wrong.
- As a last resort, I have found that sometimes deleting the project in eclipse (not the source code) and re-creating it (i.e. setting up the descriptor file again, and linking the source to the build path) sometimes solves the problem. I usually also reset the simulator when I do this, just to make sure everything is as clean as possible.
You should also make sure you are using 32bit Java.
精彩评论