Issues with the maximum number of CODs for an app
I have some issues building my BlackBerry Java Application (consists of 4 modules)
It all started when I tried to bundle a 14MB file to the one of my modules. The complier wasn't able to build my app throwing a exception Fatal Internal error: java.lang.NullPointerException
- this was not a compile time error, it was a Run-Time error coming from the compil开发者_开发百科er itself.
I tried to research this problem and found the following KB article from RIM:
http://supportforums.blackberry.com/t5/Testing-and-Deployment/The-maximum-size-of-a-BlackBerry-smartphone-application/ta-p/502534
The article says that the maximum size of my application can be not more than 14000KB and also that the limit for the number of sibling COD files that can exist within a single application is 127. The second part of this statement is confusing since it is not clear if it's referring to maximum number of COD files for the whole application of just for a single module, i.e. does it mean that I can have not more than 127 per every module I have in my app (so it's 4*127 total), or the total number of all CODs I have in my app (for all 4 modules) should be not more than 127.
Anyway, I've reduced the size of my 14 MB file down to 5.5 MB and now I'm able to build the application, but I'm still unable to run it.
The results of my further experiments confused me even more - here they are:
+-----------+------------+---------------------+----------------------------------------------+ | File Size | Total CODs | Largest Module CODs | Result | +-----------+------------+---------------------+----------------------------------------------+ | 4000KB | 123 | 88 | OK | | | | | | | 4400KB | 130 | 95 | OK | | | | | | | 5500KB | 153 | 118 | 6.0/7.0 – Class | | | | | ‘net.rim.device.api.crypto.SHA1Digest’ | | | | | not found | | | | | 5.0 – Class | | | | | ‘javax.wireless.messaging.MessageConnection’ | | | | | not found | | | | | | | 6000KB | 163 | 128 | Javaloader Error loading Module: | | | | | The specified module was rejected by the | | | | | device and cannot be loaded | +-----------+------------+---------------------+----------------------------------------------+ *-Other 3 modules always had the same total numbers of CODs – 35.
The first (4000KB) and the last (6000KB) experiments make sense to me (assuming that rejected by the device
error is due to the number of CODs (128) in my module), however I’m totally puzzled by the second (4400KB) and third (5500KB). The second one has the total number of CODs for the app greater than 127 – 130, however it builds just fine. The third one has the total number of CODs greater than 127, but the number of CODs in the biggest module is less than 127, however it does not start. I know that the “Class … not found” exception could be thrown when I run on the device that has an OS version lower than the JDE complier version I used. This is not the case here.
I believe that I’m hitting some limit with my file and the number of CODs that it's generating. Does anyone know what this limit is???
Thanks!
精彩评论