FATAL EXCEPTION: main while running on Android emulator

I was following more then 3 tutorials how to export my c++ code to android apk, and result was always the same, no error in process of exporting, but when i tried to run apk it gives me error, look bottom of this post.

I really dont know what im missing, can someone point me somewhere? where to look? what to check? i tried almost everything i knew. Build paths, order and export everything is correct as all tutorials says.

This also happen when i try to export hello world aplication.

Any help will be appreciated.

Android NDK: ndk-r8e
Cocos2dx: 2.1rc0-x-2.1.4

Isnt there a problem that i have inside libs\armeabi only libgame.so ? i saw somewhere on other posts that i should have more than just this file in there. But build_native.sh wont generate anything else.

10-02 09:03:19.726: E/AndroidRuntime(1839): FATAL EXCEPTION: main
10-02 09:03:19.726: E/AndroidRuntime(1839): java.lang.ExceptionInInitializerError
10-02 09:03:19.726: E/AndroidRuntime(1839):     at java.lang.Class.newInstanceImpl(Native Method)
10-02 09:03:19.726: E/AndroidRuntime(1839):     at java.lang.Class.newInstance(Class.java:1319)
10-02 09:03:19.726: E/AndroidRuntime(1839):     at android.app.Instrumentation.newActivity(Instrumentation.java:1054)
10-02 09:03:19.726: E/AndroidRuntime(1839):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2097)
10-02 09:03:19.726: E/AndroidRuntime(1839):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230)
10-02 09:03:19.726: E/AndroidRuntime(1839):     at android.app.ActivityThread.access$600(ActivityThread.java:141)
10-02 09:03:19.726: E/AndroidRuntime(1839):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234)

Please, at least i need to answer this:

Isnt there a problem that i have inside libs\armeabi only libgame.so ? i saw somewhere on other posts that i should have more than just this file in there. But build_native.sh wont generate anything else.

I tried whole process like 50 times with no luck, still the same result, i tried also follow new tutorials i found…

Edit Application.mk inside jni folder and check if “APP_ABI” is correct.

APP_ABI := all

Looks like the same problem with this one (with the answer I’ve found):

Vikas Patidar wrote:

Edit Application.mk inside jni folder and check if “APP_ABI” is correct.
>
APP_ABI := all

this is whole Application.mk file:

APP_STL := gnustl_static
APP_CPPFLAGS := -frtti -DCOCOS2D_DEBUG=1
APP_ABI := all

Can you post your emulator configuration? I can try to test.

I’m forced to build x86 code for Android (kills me writing the ASM twice to test emulation under HAX – the armeabi emulation is always too slow)