I am trying to run my cocos2d-x game on android devices, it works perfectly on android 5.0(lollipop), but crashes on lower android versions. I am getting the following error:
02-25 10:41:09.787: E/ResourceType(18090): 0x5ad385b8: Failed to ResTable::remove() cookie = 0x3, not last table. mHeaders.size() = 4. Warning for spontaneous crashes when the garbage collector runs. 02-25 10:41:09.797: E/asset(18090): Error removing runtime skin resource (cookie 0x3) 02-25 10:41:09.797: I/asset(18090): Problem removing all runtime skin resources 02-25 10:41:09.817: D/dalvikvm(18090): Trying to load lib /data/app-lib/com.example.game-2/libcocos2dcpp.so 0x418c9ce8 02-25 10:41:09.817: E/dalvikvm(18090): dlopen("/data/app-lib/com.example.game-2/libcocos2dcpp.so") failed: dlopen failed: cannot locate symbol "atof" referenced by "libcocos2dcpp.so"... 02-25 10:41:09.817: W/dalvikvm(18090): Exception Ljava/lang/UnsatisfiedLinkError; thrown while initializing Lcom/example/game/game; 02-25 10:41:09.817: W/dalvikvm(18090): Class init failed in newInstance call (Lcom/example/game/game;) 02-25 10:41:09.817: D/AndroidRuntime(18090): Shutting down VM 02-25 10:41:09.817: W/dalvikvm(18090): threadid=1: thread exiting with uncaught exception (group=0x415af8b0) 02-25 10:41:09.827: E/AndroidRuntime(18090): FATAL EXCEPTION: main 02-25 10:41:09.827: E/AndroidRuntime(18090): java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "atof" referenced by "libcocos2dcpp.so"... 02-25 10:41:09.827: E/AndroidRuntime(18090): at java.lang.Runtime.loadLibrary(Runtime.java:361)example 02-25 10:41:09.827: E/AndroidRuntime(18090): at java.lang.System.loadLibrary(System.java:525) 02-25 10:41:09.827: E/AndroidRuntime(18090): at com.example.game.game.(game.java:126) 02-25 10:41:09.827: E/AndroidRuntime(18090): at java.lang.Class.newInstanceImpl(Native Method) 02-25 10:41:09.827: E/AndroidRuntime(18090): at java.lang.Class.newInstance(Class.java:1130) 02-25 10:41:09.827: E/AndroidRuntime(18090): at android.app.Instrumentation.newActivity(Instrumentation.java:1061) 02-25 10:41:09.827: E/AndroidRuntime(18090): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2178) 02-25 10:41:09.827: E/AndroidRuntime(18090): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2311) 02-25 10:41:09.827: E/AndroidRuntime(18090): at android.app.ActivityThread.access$600(ActivityThread.java:149) 02-25 10:41:09.827: E/AndroidRuntime(18090): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1293) 02-25 10:41:09.827: E/AndroidRuntime(18090): at android.os.Handler.dispatchMessage(Handler.java:99) 02-25 10:41:09.827: E/AndroidRuntime(18090): at android.os.Looper.loop(Looper.java:137) 02-25 10:41:09.827: E/AndroidRuntime(18090): at android.app.ActivityThread.main(ActivityThread.java:5214) 02-25 10:41:09.827: E/AndroidRuntime(18090): at java.lang.reflect.Method.invokeNative(Native Method) 02-25 10:41:09.827: E/AndroidRuntime(18090): at java.lang.reflect.Method.invoke(Method.java:525) 02-25 10:41:09.827: E/AndroidRuntime(18090): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:739) 02-25 10:41:09.827: E/AndroidRuntime(18090): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:555) 02-25 10:41:09.827: E/AndroidRuntime(18090): at dalvik.system.NativeStart.main(Native Method).
I am using cocos2d-x v2.2.6,Eclipse-Luna and android NDK r10d.