Androidharness not working

well the issue is. that it doesnt start its internal activity when i extend that class, when i run the debugger the activity is still set to null. ive read though the tutorials and nothing explains this issue, or im missing something. ive imported the jmonkeyengien3.jar and JME3-android.jar into the project.

It seems you missed somethink start it like i did :wink:

I give u a link in a sec, are you writing code with sdk or other ide?

Try this:
how to with eclipse

If you prefer to do catch something from your android system (Activity) in your game:
You need to do this

If you make a terrain with terrain editor dont forget that:
correct the black texture

If this post was helpful, rate it :wink:

i tried with eclipse at first just importing the jmonkey jar and the jmonkey android jar. dunno but some jars you can import and some it will not work. now im trying the jmonkeyplatform but that is giving me issues with the android imports. also if i use the jmonkeyplatform i cant use the avd emulator right?
the error i get is a classnotfound error when i run the project in the emulator after

this is the error i get now from the jmonkey ide
/home/toor/Desktop/Jmonkey/JME3Android/nbproject/mobile-impl.xml:10: The following error occurred while executing this line:
/home/toor/Desktop/eclipse/android-sdk-linux/tools/ant/build.xml:962: The following error occurred while executing this line:
/home/toor/Desktop/eclipse/android-sdk-linux/tools/ant/build.xml:973: The following error occurred while executing this line:
/home/toor/Desktop/eclipse/android-sdk-linux/tools/ant/build.xml:312: [/java]

but thanks i will try out your links and see what happens

You don’t need to import jME3-Android.jar to the project, read the manual on deployment. Just make a normal BasicGame project and check the Android checkbox in the project preferences.

okay, but still is it possible to test it out on a android emulator or do i need to install the apk on my phone every time i want to run a demo?

and why wouldnt this work. simple and easy to use. still gives me

protected void onCreate(Bundle savedInstanceState) {
startActivity(new Intent(this, GameActivity.class));
public class GameActivity extends AndroidHarness {
Game game;
public void onCreate(Bundle savedInstanceState) {
game = new Game(this);
public GameActivity () {
appClass = com.example.jmonkey.Game.class.getName();
screenOrientation = ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE;
public class Game extends SimpleApplication {
private Context mActivity;

public Game(Context activity){
public void simpleInitApp() {


09-19 06:20:35.220: E/AndroidRuntime(1093): FATAL EXCEPTION: main
09-19 06:20:35.220: E/AndroidRuntime(1093): Process: com.example.jmonkey, PID: 1093
09-19 06:20:35.220: E/AndroidRuntime(1093): java.lang.NoClassDefFoundError: com.example.jmonkey.GameActivity
09-19 06:20:35.220: E/AndroidRuntime(1093): at com.example.jmonkey.MainActivity.onCreate(
09-19 06:20:35.220: E/AndroidRuntime(1093): at
09-19 06:20:35.220: E/AndroidRuntime(1093): at
09-19 06:20:35.220: E/AndroidRuntime(1093): at
09-19 06:20:35.220: E/AndroidRuntime(1093): at
09-19 06:20:35.220: E/AndroidRuntime(1093): at$800(
09-19 06:20:35.220: E/AndroidRuntime(1093): at$H.handleMessage(
09-19 06:20:35.220: E/AndroidRuntime(1093): at android.os.Handler.dispatchMessage(
09-19 06:20:35.220: E/AndroidRuntime(1093): at android.os.Looper.loop(
09-19 06:20:35.220: E/AndroidRuntime(1093): at
09-19 06:20:35.220: E/AndroidRuntime(1093): at java.lang.reflect.Method.invokeNative(Native Method)
09-19 06:20:35.220: E/AndroidRuntime(1093): at java.lang.reflect.Method.invoke(
09-19 06:20:35.220: E/AndroidRuntime(1093): at$
09-19 06:20:35.220: E/AndroidRuntime(1093): at
09-19 06:20:35.220: E/AndroidRuntime(1093): at dalvik.system.NativeStart.main(Native Method)


Please, do read the manual on android deployment:

You just press the “run” button the the SDK to run the project on your phone (or emulator if no phone is connected). Its advised to use a phone for testing though as the emulator doesn’t work well for 3D applications.

yah i have read that and dont think ive missed anything. when i press my run button it opens the normal gameview with the JVM and not the AVD. i cant use usb to connect to my phone since the android sdk doesnt support that on linux. ive done pure opengles programming and have not noticed any problems with the emulator yet.

but im not able to install the android plugin

“The Plugin Installer found problem timeout of loading Android Project[] while install the following plugins:”

Maybe read again, you have to select the “Android Device” profile next to the run button…

Why do you have to install any plugin? Its installed by default.

yes i have done all that, im not a total loser.

and the tutorial mentioned a android plugin in that link you posted


also is there a jmonkey api reference page? where you can see all classes?

My question was why do you have to install the plugin, everything you need is installed in the 3.0 SDK distribution. The NBAndroid is an OPTIONAL addition to get code completion for the android part of the files and its not maintained by us.

The SDK allows you to see the javadoc of the engine, see Help->Javadoc References or just press Ctrl-Space when you have your cursor on a class name in the editor.

“Activating the nbandroid plugin in the jMonkeyEngine SDK is optional, but recommended. You do not need the nbandroid plugin for Android support to work, however nbandroid will not interfere and will in fact allow you to edit the android source files and project more conveniently. To be able to edit, extend and code android-specific code in Android projects, install NBAndroid from the update center”

still the AVD doesnt come up, i have the correct path to my sdk i can open the sdk manager from the jmonkey sdk but when i run it its still the JVM that starts

And you did select the “Android Device” entry in the dropdown? And use the run button?

yes, check the screenshot

I can’t see from that how you run the application but if you use the run button then I don’t know what the issue is in your setup. Make sure the default device or emulator is set in the AVD, try running the android run targets directly by right-clicking the build.xml. Good luck.

thanks, i had some premission errors. im at “Waiting for device to be ready… Connect your device now if its not connected yet.” now in the execution. now its waiting for my damn phone and still no avd. do you have to change the build config to find the avd or something, you said it would find it if no phone was connected

ahhhhhhhh, okay think this might work. thanks dude^^

java.lang.UnsupportedOperationException: OpenGL ES 2.0 is not supported on this device…
i know for a fact it does support it, ive added permission in the manifest. ive tried opengles 3.0 on the same device and it worked

Never had this problem. Do you use a device now?