J2ME 应用程序崩溃
我创建了一个在模拟器中完美运行的 Java ME 应用程序。但当我在诺基亚 5233 或其他设备上运行该应用程序时,它崩溃了,并且没有提示任何警报。
我尝试捕获所有异常以找出我的应用程序何时崩溃。但它也毫无价值,因为我在崩溃时没有收到警报消息。 任何人都可以告诉我会出现什么问题吗?应用程序崩溃后,我重新启动应用程序,它在同一点崩溃多次。如果我继续尝试一段时间,效果会很完美。不知道出了什么问题。它在模拟器中运行良好。
I have created a Java ME application which works perfectly in the emulator. But when I run the application on Nokia 5233 or other devices it crashes without prompting any alert.
I tried to catch all exception to find out when my application getting crashed. But it is also worthless as I'm not getting alert message while crashing.
Can any one suggest me what would be the problem? After application crash I restart my application and it crashes at same point for number of times. If I continue trying some time it works perfectly. Don't know what's the problem. It works fine in emulator.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
因此,如果您无法获取任何堆栈跟踪,您应该注释掉
startApp()
方法中的所有行。然后逐行取消注释并每次在设备上运行它。这样您就可以找到应用程序崩溃的行。特别是应审查诸如数据存储之类的服务的使用。另一种方法可能是向代码中添加详细日志记录,以查看执行的最后一行是什么。
另请看看这个问题:How to get the stacktrace in移动设备
So if you are not able to get any stacktrace you should comment out all the lines from your
startApp()
method. Then uncomment successively one line after another and run it every time on the device. That way you will find the line on which your application crashes. Especially the usage of services like e.g. the DataStorage should be reviewed.Another way could be to add verbose logging to your code to see what's the last line which gets executed.
Also have a look at this question: How to get the stacktrace in a mobile device