Android Run Problem

When ı run project, always android emulator give error. Jmonkey error is
[java]java.lang.RuntimeException: Unable to start activity ComponentInfo{com.mycompany.mygame/com.mycompany.mygame.MainActivity}: java.lang.NullPointerException
E/AndroidRuntime( 339): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2663)
E/AndroidRuntime( 339): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
E/AndroidRuntime( 339): at android.app.ActivityThread.access$2300(ActivityThread.java:125)
E/AndroidRuntime( 339): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
E/AndroidRuntime( 339): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 339): at android.os.Looper.loop(Looper.java:123)
E/AndroidRuntime( 339): at android.app.ActivityThread.main(ActivityThread.java:4627)
E/AndroidRuntime( 339): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 339): at java.lang.reflect.Method.invoke(Method.java:521)
E/AndroidRuntime( 339): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
E/AndroidRuntime( 339): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
E/AndroidRuntime( 339): at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime( 339): Caused by: java.lang.NullPointerException
E/AndroidRuntime( 339): at android.view.ViewGroup.addViewInner(ViewGroup.java:1969)
E/AndroidRuntime( 339): at android.view.ViewGroup.addView(ViewGroup.java:1865)
E/AndroidRuntime( 339): at android.view.ViewGroup.addView(ViewGroup.java:1845)
E/AndroidRuntime( 339): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:217)
E/AndroidRuntime( 339): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:207)
E/AndroidRuntime( 339): at android.app.Activity.setContentView(Activity.java:1658)
E/AndroidRuntime( 339): at com.jme3.app.AndroidHarness.layoutDisplay(AndroidHarness.java:454)
E/AndroidRuntime( 339): at com.jme3.app.AndroidHarness.onCreate(AndroidHarness.java:227)
E/AndroidRuntime( 339): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
E/AndroidRuntime( 339): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
E/AndroidRuntime( 339): … 11 more
W/ActivityManager( 70): Force finishing activity com.mycompany.mygame/.MainActivity[/java]

Emulator says Stop aplication what is that problem. How can I solve

You can’t run opengl stuff on the computer emulator. Which meens, jme wont work on the emulator.
I connect my phone through usb to debug my apps.

It works now if you don’t do too fancy stuff.

You should do the following:

  • Use the latest system image (ARM) for Android 4.2
  • Turn “Use host GPU” on

Ask again here if it doesn’t work.