Hello everybody,
I use simulator to develop my game, but after install the program to my phone (Nokia 3120 and the file size of the game is 24KB), and the real phone tell me cannot be excuted.
So, could you tell me which factors can lead to this problem? ???
Thank you very much~
I’m afraid we’ll need more information than that if we’re to help you. What was the error message (precisely)? How did you install it in the phone (from a WAP site?)? What does your JAD file contain? How did you build the MIDlet? (Wireless Toolkit? Ant + Antenna?). And anything else that might be relevant…
Oh, sorry.
-
The error message is " ! Unable to run application"
The message is displayed after I choose “start” in the Splash image. -
I use Nokia PC Suite to install my application
-
JAD file contains 3 classes, they are:
a) GameMIDlet
b) GameScreen (i.e. Canvas)
c) RMSUtil (i.e recordstorage)
For the RMS, I create a database called “gamedb” which places in the constructor of GameScreen. And then it will compares the scores with the scores in the database every time. If the score is higher than the database, it will replace database’s record.
d) 11KB of png in res -
I use Sun’s KToolbar and Nokia S40 SDK to develop my application.
Thanks a lot~~
The error message occurs every time after the title splash page changes to GameScreen, no matter the title page automatically changes to GameScreen or I click the start command manually.
I discover that when I changed the Splash image to a text (i.e: g.drawString(“GameABC”, 0, 0, Graphics.TOP|Graphics.LEFT); )
then the problem will not occur.
But when I use an image to replace the text in the title Page, the problem will occur again.
P.S: The splash image only 1.2KB.
Can anyone help me?
Thank you very much!
“Unable to run application” on Nokia phones usually means you are running out of heap memory. This would easily explain why when you don’t load an image for the splash screen it doesn’t happen (the fact that the image is 1.2 KB is irrelevant: Nokia phones will convert the image to their native format when it’s loaded and it will take 2*pixels + C bytes in the heap).
So basically you need to make your app more memory-effective. One thing worth noticing is that these handsets don’t have a compacting garbage collector so memory fragmentation can cause the “Unable to run…” message even if the actual memory usage is below the limit (which is around 200K on Nokia handsets).
The memory profiler in the WTK can be a useful tool in these cases.
shmoove
Thanks for your reply
And the memory profiler, there are 5 columns, which one that I should concern?
Thanks a lot!