We have been getting a lot of crash reports on google play with the following crash log :
java.lang.ExceptionInInitializerError
at java.lang.Class.newInstanceImpl(Native Method)
at java.lang.Class.newInstance(Class.java:1409)
at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1572)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1674)
at android.app.ActivityThread.access$1500(ActivityThread.java:117)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:942)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:130)
at android.app.ActivityThread.main(ActivityThread.java:3733)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:931)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:689)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.UnsatisfiedLinkError: Couldn't load cocos2dcpp: findLibrary returned null
at java.lang.Runtime.loadLibrary(Runtime.java:429)
at java.lang.System.loadLibrary(System.java:554)
at com.xx.xxx.xxxx.<clinit>(xxxx.java:173)
... 15 more
This error only happens for devices with android version 2.3.3-2.3.7. This seems to be a common problem but no one has a solution. Has anyone solved this issue.
Some of the links reporting this problem are :
http://www.cocos2d-x.org/forums/6/topics/45833
http://www.cocos2d-x.org/forums/6/topics/42570
Thanks in advance.
Couldn't load cocos2dcpp
this is the main application's name. "libcocos2dcpp.so"
you can find this in AndroidManifest.xml
<!-- Tell Cocos2dxActivity the name of our .so -->
<meta-data android:name="android.app.lib_name"
android:value="cocos2dcpp" />
also, in proj.android/jni/Android.mk
LOCAL_MODULE_FILENAME := libcocos2dcpp
i guess you changed the module name in Android.mk