问题描述
该应用程序工作完全正常的模拟器和设备。添加新组图片后,开始显现出在每次运行时,在模拟器上和设备上,一类未发现异常。
The app works perfectly fine on the simulator and on the device. After adding a new set of images, it started to show on every run, on the simulator and on the device, a class not found exception.
当试图删除一些图像,找出原因,我得到运行时,没有发现不同的类。编译和打包的应用程序不会产生警告或错误。他们甚至得到签署。一些未发现异常类我得到:
When trying to delete some images to find the cause, I get different classes not found when running. Compiling and packaging the application generates no warning or error. They even get signed. Some of the "classes not found exception" I get:
java.lang.StringBuilder中
net.rim.device.api.ui.uiapplication
java.lang.stringbuildernet.rim.device.api.ui.uiapplication
我猜测它是与总的图像尺寸。每幅图像的大小范围从100KB到300KB,而我们在谈论总额只有25至30的图像。添加图像的资源的文件夹的外不产生错误,但图像不会被添加到最终文件。删除的图像,那些刚刚添加解决了这个问题,但我需要这些图片...
I am guessing it has something to do with the total image size. The size of each image ranges from 100KB to 300KB, and we are talking of only 25 to 30 images in total. Adding the image outside of the 'res' folder doesn't generate the error, but the image isn't added to the final files. Deleting the images, the ones just added resolved the issue, but I need those images...
此外,这个应用程序并不大,但编译时和打包的应用程序,它会生成和SIGNES 125 cod文件。那是正常的吗?
Also, this application is not big, but when compiling, and packaging the app, it generates and signes 125 cod files. Is that normal?
我使用Eclipse 3.6(太阳神),和黑莓Eclipse插件SDK 5.0.0.25在Win 7
I am using Eclipse 3.6(Helios), and BlackBerry Eclipse Plugin SDK 5.0.0.25 on Win 7
任何帮助将AP preciated。谢谢你。
Any help will be appreciated. Thanks.
推荐答案
原来,这个问题是因为我的图片,这反过来又创造了更多的则127 .cod文件的总大小造成的。姐弟.cod文件总数是127,我的应用程序有这样的限制,这就是为什么没有包括一些必要的课程。我仍然认为黑莓插件应该提醒这一点,是因为它编译,打包并签署应用程序时显示出任何错误。下面是从黑莓开发者支持论坛,在那里我得到这个信息的链接:
It turns out this issue was caused because of the total size of my images, which in turn created more then 127 .cod files. Total number of siblings .cod files is 127, my app had that limit, and this is why some essential classes were not included. I still think the blackberry plugin should warn about this, because it showed no error when compiling, packaging and signing the application. Here is the link from the BlackBerry developer support forums where I got this information:
http://supportforums.blackberry.com/t5/Testing-and-Deployment/The-maximum-size-of-a-BlackBerry-smartphone-application/ta-p/502534
因为我习惯了iOS的世界,在那里我可以添加任何我想要的应用程序,它有对我可以添加的资源几乎没有限制,除了考虑用户将不得不等待一个良好的数额时间下载的应用程序,以及2GB的应用程序的大小,这,真的是有很多的应用程序的99%。
Since I am used to the iOS world, where I can add whatever I want to the app, and it has virtually no limit on the resources I can add, except to consider that the user would have to wait a good amount of time downloading the app, and the 2GB application size, which, really is a lot for 99% of the apps.
因此,对于这个程序我所做的就是我只添加了必要的图像作为编制资源的应用程序,应用程序启动时第一次图像的其余部分将自动下载。
So for this app what I did was I added only the essential images as compiled resources in the app, and the rest of the images are downloaded automatically when the application launches the first time.
这篇关于类增加一个新的图像资源文件夹后,未发现异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!