Hi.
Someone please help.
I’m getting this crash when trying to run cocos2d-js project on Android.
I followed integration how-to and it’s perfectly works on iOS, but no results on android still although I tried all solutions I found for this problem in google and especially on this forum.
Here is details for exception:
01-02 22:21:45.935 20568-20568/ru.heximal.madknight E/AndroidRuntime: FATAL EXCEPTION: main
Process: ru.heximal.madknight, PID: 20568
java.lang.UnsatisfiedLinkError: No implementation found for void com.sdkbox.plugin.SDKBox.nativeInit(java.lang.Object, java.lang.ClassLoader) (tried Java_com_sdkbox_plugin_SDKBox_nativeInit and Java_com_sdkbox_plugin_SDKBox_nativeInit__Ljava_lang_Object_2Ljava_lang_ClassLoader_2)
at com.sdkbox.plugin.SDKBox.nativeInit(Native Method)
at com.sdkbox.plugin.SDKBox.init(SDKBox.java:71)
at org.cocos2dx.lib.Cocos2dxActivity.onCreate(Cocos2dxActivity.java:265)
at android.app.Activity.performCreate(Activity.java:6012)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1106)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2292)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2410)
at android.app.ActivityThread.access$800(ActivityThread.java:151)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1313)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5348)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:947)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:742)
still no success.
I’ve double-triple checked all steps from manual integration guide, but still getting this crash.
looks like native libs are not linked to the project.
what am I doing wrong?
Can you search and see if there is a jni folder in your project? If there is can you double check if there is sdkbox and sdkboxplay folder in it? If both folders are there check Android.mk to make sure they’re been referenced.
I did modify Application.mk and now the compiler produces the error
/frameworks/runtime-src/proj.android-studio/../../cocos2d-x/cocos/3d/../base/CCDirector.h:32:18: fatal error: thread: No such file or directory
#include <thread>
^
In file included from /frameworks/runtime-src/proj.android-studio/../../cocos2d-x/cocos/3d/../base/CCAsyncTaskPool.h:29:0,
from /frameworks/runtime-src/proj.android-studio/../../cocos2d-x/cocos/3d/../cocos2d.h:41,
from jni/../../../Classes/SDKBoxJSHelper.h:10,
from jni/../../../Classes/PluginSdkboxPlayJS.cpp:3:
/frameworks/runtime-src/proj.android-studio/../../cocos2d-x/cocos/3d/../base/CCDirector.h:32:18: fatal error: thread: No such file or directory
#include <thread>
^
compilation terminated.
compilation terminated.
make: *** [obj/local/armeabi/objs-debug/cocos2djs_shared/__/__/__/Classes/PluginSdkboxPlayJSHelper.o] Error 1
make: *** [obj/local/armeabi/objs-debug/cocos2djs_shared/__/__/__/Classes/PluginSdkboxPlayJS.o] Error 1
make: Leaving directory `/frameworks/runtime-src/proj.android-studio/app'
Error running command, return code: 2.