Addition for Android Project Cheat Sheet... but, not sure how to

So, one of the things I thought would be useful for the Android Cheat Sheet would be how to exclude some of the JME jar’s included in the default project, but I’m not sure how to change this. (Or at least I couldn’t track down where to change this).

For one of the games I am working on, I have no need for the following and would love to exclude them from the build if I can:

nifty.jar
nifty-style-black.jar
nifty-default-controls.jar
JME3-niftygui.jar
JME3-terrain.jar
JME3-bullet.jar

They are not being used and just bloat the apk (in this instance). Any way to get rid of these on a per-project basis?

Bump… anyone?

Can’t you just remove them from the project’s libraries in the sdk or am I missing some important point here? Not sure if this will effect android, but it should.

Check the manual on deployment.

@destroflyer said: Can't you just remove them from the project's libraries in the sdk or am I missing some important point here? Not sure if this will effect android, but it should.

I don’t know… but thought I’d ask before I try it.

@normen said: Check the manual on deployment.

Ok… cool… I take it this is covered there?

What I usually do is to have a “lightJME” librairie.

In the tool/libraries menu you can create your own libs (you can find JME3 in the list).
Just create a lightJME, add only the jars you need to it, then link this lig instead of the JME3 lib in your project.

3 Likes
@nehon said: What I usually do is to have a "lightJME" librairie.

In the tool/libraries menu you can create your own libs (you can find JME3 in the list).
Just create a lightJME, add only the jars you need to it, then link this lig instead of the JME3 lib in your project.

No, if you do it this way they maybe won’t be updated when you update the SDK depending on where they are at the time you create the library. Theres preconfigured library entries for all parts of the engine so you can combine them as you like in your app. And yes, thats described in the manual under “deployment”.

Well…that’s true that I use the libs of the dist folder of JME…so I don’t really have the issue, but yeah you have point.

Specifically, at the bottom of https://wiki.jmonkeyengine.org/legacy/doku.php/sdk:application_deployment, under the heading “Reduce Distribution File Size”

I was looking in the wrong place (on the https://wiki.jmonkeyengine.org/legacy/doku.php/jme3:android page under the “Activate Android Deployment” heading. :stuck_out_tongue:

1 Like