Huge filesize

Ok, I am new to android and JME so shoot me down, by all means.

I’ve built the first tutorial, rendering a cube on my android phone. Very good.

One problem - 43 MB?! Obviously a huge library is loaded onto my phone when installing my app.

Is ther any way to shrink this? Its not very friendly to expect users to download such large files on mobile internet.

Can it not just provide the files needed by the app, rather than the whole jar?



I guess you added the example data? Then copy what you actually need from the “Library” node of the project to the “Project Assets” node by using Ctrl-C / Ctrl-V. Make sure the folder structure is the same in the end and then remove the jme3-testdata.jar from the library. Also read the manual (press F1) on deployment, it gives you hints on how you can exclude external libraries you don’t use, e.g. niftygui or physics.

Ok thanks for the good advice, Normen. I will follow your leads.

Shame java wont package just waht you use. Sorry, coming from MSVC :slight_smile:

@normen. I am not quite sure what you suggest.

In the libraries node, i have the jme3 jar, JDK 1.6, and the projects assets folder (seems to be empty). I didn’t ‘add example data’, its just a basicgame with android enabled.

Dont seem to be able to copy and paste out of the jme3 jar.

Yes you can copy and paste, use the keyboard shortcuts. Anyway if you didn’t add the jme3-testdata library, just thin out the projects libraries as outlined in the manual. I take it you are using the latest nightly version of the sdk and the new android deployment feature? Honestly I don’t think the default app is that big on any platform.

Hi Normen,

I followed the instructions in the manual, ‘Tip: Reducing Distribution Size’.

I removed jme3-libraries and added jme3-libraries-lwjgl-minimum. Unfortunately this doesn’t seem to provide the libraries required to build the SimpleApplication:

package does not exist
package com.jme3.material does not exist
import com.jme3.material.Material;
package com.jme3.math does not exist
import com.jme3.math.ColorRGBA;
package com.jme3.renderer does not exist
import com.jme3.renderer.RenderManager;
package com.jme3.scene does not exist
import com.jme3.scene.Geometry;

and others.
I've searched the docs but don't see which other library to include. Any advice gratefully received.

You also removed “jme3”, the classes are all core jme3 classes. Add the “jme3” library again.

1 Like

If you open jme3-testdata.jar with winrar you simply delete anything not referenced from your app and/or alternatively drag and drop resources in and out as needed.

You can simply add the jme3-test-data library once, then copy & paste (via keyboard) the stuff you need from the Library to the Project Assets node. Afterwards remove the library from the project settings.