How to Including Assets in Android build?(JME3 SDK Android novice)

hi i’m JME3 SDK Android novice,

i use win7, jme3 sdk, and i build a directory in my project path

like this “C:UsersspringDocumentsjMonkeyAndroidApplication2Models”

but still can’t work

and i also creat a new project and make a new assets.jar (incclude my Models directory) and put in my lib directory

but still can’t see my models build assets.jar or in apk

always error Exception …

  1. how to Including Assets in Android build?

    when i use this =>> myMaze = assetManager.loadModel(“Models/Grid.j3o”);

    which directory to put my models files?
  2. i delete the nifty*.* libs and jME3-testdata, because it cause build fail, or can give me the libs list for android building?

You put them in the asset folder in the project.

When you create a project, anyways in eclipse, some folders will be auto generated:





In the asset folder you should place the Models folder THO do NOT make anything in capital letters.

Eclipse will complain about it and if you try to run it anyways it will fail.

So your model should be like this:


I don’t know why you “have to make” an assets.jar or “put it in the lib dir”. That is all done for your in the SDK. Just create a new BasicGame project and enable android deployment, everything else works like on for desktop applications too.

thanx Addez & normen for the reply!

i use JME3 SDK

when i try to use the sensorsimulator-2.0-rc1 in new project ==> JME3 BasicGame

i can’t import any Android lib, then i add jar android-sdkplatformsandroid-8android.jar

but i still can’t find main.xml for android

i can’t show x,y,z in TextView (i try to do this)

so i try another way, File => New Project => Android => Android Project

then i can import android and JME3 Liberys, and i can use the main.xml (layout)

but now, i can’t use my Models in “assets/models/grid.j3o”

this is what happened =.="

Please read the manual on android distribution, you do not have to add any android library.

are u using eclipse or sdk?

@Addez said:
are u using eclipse or sdk?

He's even saying that he uses the SDK, please stop confusing people with your eclipse setup tips, most people that do not say otherwise use the SDK as its easy to install and setup :P

Lol! xD

My shortterm memory is terrible.

JME SDK is so nice and fast!

i have finish setup here ==>

and i can build a cube model on my phone (by JME3 BasicGame)

but now i want try Sensor to control the cube in Android

new project ==> JME3 BasicGame or

==> Android => Android Project? which is better for android?

because when i use JME3 BasicGame, i can’t see any Android libraries (can’t import)

Forgive novice, can give suggest?

As I said, you do not have to add anything, just create a BasicGame project. Again read the manual on android.