LWUIT - 在主题中使用数据导致 java.lang.OutOfMemoryError
我正在使用 LWUIT 1.5 制作我自己的主题以应用于我的 J2ME 应用程序。当我从 LWUIT 资源编辑器的“数据”选项卡将数据添加到主题时,我发现了一个问题。这些数据文件是 .csv
文件。
当我运行我的应用程序时,它在 Eclipse 控制台中显示 java.lang.OutOfMemoryError
并且它无法启动。
我发现其中几个数据文件导致了此问题,因为它们的大小超过 100.000 字节。这是否意味着我需要使用更小的数据?这是否意味着该资源存在最大大小?
有什么想法吗?
谢谢
I'm working with LWUIT 1.5 to make my own theme to apply to my J2ME application. I've found a problem when I've added datas to my theme from Data tab in LWUIT Resource Editor. Those data files are .csv
files.
When I run my application, It show me java.lang.OutOfMemoryError
in my Eclipse console and it doesn't start.
I've found that several of this data files are causing this problem because their sizes are more than 100.000 bytes. Does it means that I need to use data more small? Does it means that exist a maximum size to that resources?
Any ideas?
Thank you
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
基本上
OutOfMemoryError
发生在 S40 手机上。因为它们只有 1 到 2 MB 大小的堆内存。他们无法在运行时扩展内存。因此,当它存在时,将抛出OutOfMemoryError
异常。所以更好的主意是,如果您处理巨大的文件,只需将其存储在服务器中并从服务器读取即可。为此,请使用 Web 服务。看看这些文章,然后您可以更好地了解如何处理,Basically
OutOfMemoryError
occurs on S40 mobiles. Because they have only heap memory 1 to 2 MB size. They can't extended their memory on run time. So when its exist,OutOfMemoryError
exception will be throw. So better idea, If you handle huge size of files, just store it in server and read from server. Use web service for this. Look on these articles, then you can get better idea about how to handle,