Cocos2D-x game, fresh from the Play Store, doesn't even open

I just finished my first cocos2d-x game. I tested it on my GNexus 4.1 and other lower devices, including tablets. However, having bought and downloaded the Nexus 7, it will not even open. Could this be a problem 4.2? Any help would be greatly appreciated. crash report:

java.lang.ExceptionInInitializerError at java.lang.Class.newInstanceImpl(Native Method) at java.lang.Class.newInstance(Class.java:1319) at android.app.Instrumentation.newActivity(Instrumentation.java:1054) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2097) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230) at android.app.ActivityThread.access$600(ActivityThread.java:141) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:137) at android.app.ActivityThread.main(ActivityThread.java:5039) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:511) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560) at dalvik.system.NativeStart.main(Native Method) Caused by: java.lang.UnsatisfiedLinkError: Cannot load library: soinfo_relocate(linker.cpp:975): cannot locate symbol "__exidx_end" referenced by "libgame.so"... at java.lang.Runtime.loadLibrary(Runtime.java:371) at java.lang.System.loadLibrary(System.java:535) at com.penguinproductions.classiclightcycles.<clinit>(classiclightcycles.java:107) ... 15 more 
+2
source share
1 answer

There are many applications that suffer from this error. This happens on Android 4.2 with a project compiled using a specific Android NDK - for me it was r8d, but you can also find people with other versions with this error. The workaround I found is mentioned here . The solution is to add the following lines of code to any of your .cpp files:

 #ifdef __cplusplus extern "C" { #endif void __exidx_start() {} void __exidx_end() {} #ifdef __cplusplus } #endif 

It worked for me.

But I think you should follow, because in a future version of the NDK, when they finally fix this, these characters can be defined twice, so this workaround will turn into an error. Actually.

+5
source

All Articles