A very simple scene (same as helloworld example, but with 2 buttons) that runs fine in the win32 simulator, blows up when I attempt to run it on the device. Playing around with the debugger I found this:
09-27 18:33:45.322: ERROR/AndroidRuntime(4896): FATAL EXCEPTION: main
09-27 18:33:45.322: ERROR/AndroidRuntime(4896): java.lang.ExceptionInInitializerError
09-27 18:33:45.322: ERROR/AndroidRuntime(4896): at java.lang.Class.newInstanceImpl(Native Method)
09-27 18:33:45.322: ERROR/AndroidRuntime(4896): at java.lang.Class.newInstance(Class.java:1409)
09-27 18:33:45.322: ERROR/AndroidRuntime(4896): at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
09-27 18:33:45.322: ERROR/AndroidRuntime(4896): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1561)
09-27 18:33:45.322: ERROR/AndroidRuntime(4896): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
09-27 18:33:45.322: ERROR/AndroidRuntime(4896): at android.app.ActivityThread.access$1500(ActivityThread.java:117)
09-27 18:33:45.322: ERROR/AndroidRuntime(4896): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
09-27 18:33:45.322: ERROR/AndroidRuntime(4896): at android.os.Handler.dispatchMessage(Handler.java:99)
09-27 18:33:45.322: ERROR/AndroidRuntime(4896): at android.os.Looper.loop(Looper.java:130)
09-27 18:33:45.322: ERROR/AndroidRuntime(4896): at android.app.ActivityThread.main(ActivityThread.java:3683)
09-27 18:33:45.322: ERROR/AndroidRuntime(4896): at java.lang.reflect.Method.invokeNative(Native Method)
09-27 18:33:45.322: ERROR/AndroidRuntime(4896): at java.lang.reflect.Method.invoke(Method.java:507)
09-27 18:33:45.322: ERROR/AndroidRuntime(4896): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
09-27 18:33:45.322: ERROR/AndroidRuntime(4896): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
09-27 18:33:45.322: ERROR/AndroidRuntime(4896): at dalvik.system.NativeStart.main(Native Method)
09-27 18:33:45.322: ERROR/AndroidRuntime(4896): Caused by: java.lang.UnsatisfiedLinkError: Couldn’t load game: findLibrary returned null
09-27 18:33:45.322: ERROR/AndroidRuntime(4896): at java.lang.Runtime.loadLibrary(Runtime.java:429)
09-27 18:33:45.322: ERROR/AndroidRuntime(4896): at java.lang.System.loadLibrary(System.java:554)
09-27 18:33:45.322: ERROR/AndroidRuntime(4896): at org.cocos2dx.Pong.Pong.(Pong.java:48)
09-27 18:33:45.322: ERROR/AndroidRuntime(4896): … 15 more
I’d go witch hunting in my code, but it seems to be it doesn’t find a library, so maybe I’m setting them up wrong? Can anyone confirm this and/or tell me how to do it properly?
Help much appreciated.