Skip to main content

APP SIZE REDUCTION: HOW????

6 replies [Last post]
amuche
Offline
Joined: 2011-09-05
Points: 0

Please where can I place the lwuit jar file so as to avoid the increase in app size of ma project? i think

if i can place the lwuit jar file away from the .jad,i should have a rduced app size,since obfuscating isnt working for me?

or any better option of rducing app size?

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
jkoorts
Offline
Joined: 2012-03-14
Points: 0

Ok amuche,

Take the lwuit source. Add it to your project. Remove the jar libs. So what you should have is the raw source files of lwuit and your source files. Now compile and make a j2me jar out of that by using proguard to obfuscate all the code.

You should end up with a tight jar.

If you want to go even smaller then you need to get your hands dirty and remove classes (eg. Transition) that you know your app does not need. See my other posts on why you need to help proguard along.

amuche
Offline
Joined: 2011-09-05
Points: 0

like i go to the lwuit folder and dlit unused classes? wudnt dat affect ma app? mayb i dnt undastnd wat u saying..

cud u give sum step by step approach plis? thanks. amuche

jkoorts
Offline
Joined: 2012-03-14
Points: 0

Ok mate, first learn to spell.

Let me help you by translating your sentence:

"Like I go to the lwuit folder and delete unused classes? Would that affect my app? Maybe I dont understand what you're saying.. Could you give some step by step approach please? Thanks, amuche"

1. Remove the lwuit lib

2. add the lwuit source files

3. compile your application with proguard

4. Post back the size of your application and then we take it from there.

amuche
Offline
Joined: 2011-09-05
Points: 0

PROBLEM WITH STEP 2!

please whre in ma app package can i find my lwuit source file? i hav rmoved the lwuit lib (ie the lwuit MIDP jar file,dunno if dat was corect)

and source code showed error in almost all lines!!..cudnt go n with other steps though..

CANT IMAGINE how grateful I wud b if I hav dis issue resolved!!!

jkoorts
Offline
Joined: 2012-03-14
Points: 0

note that you need to add the lwuit src as well as the lwuit midp src.

what lines are red?

Start with a hallo world project.

amuche
Offline
Joined: 2011-09-05
Points: 0

started with a helo project aded the lwuit jar file into ma resources folder, had a sucesful run of the project..yeah
so at this point wat du i du next to reduce the app size?? think i can understand any proces from here