No implementation found for void com.sdkbox.plugin.SDKBox.nativeInit

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)

Which plugin are you using?

hi.
I’m currently trying to setup sdkboxplay plugin.

Looks like the integration process was not complete.

Can you double check with the manual integration steps to make sure all the integration steps are completed?

http://docs.sdkbox.com/en/plugins/sdkboxplay/v3-js/#manual-integration-for-android

it’s said
Copy the sdkboxplay_lib directories from plugin/android/libs to your <project_root>/libs/ directory.

but I can’t find any directories at plugin/android/libs. is it about plugin bundle, right?

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.

yeah, it is there (jni folder).
I also tried to replace gnustl with c++static.
here is my Android.mk

LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)

LOCAL_MODULE := cocos2djs_shared

LOCAL_MODULE_FILENAME := cocos2djs

LOCAL_SRC_FILES := hellojavascript/main.cpp \

../../../Classes/AppDelegate.cpp \
../../../Classes/PluginSdkboxPlayJS.cpp \
../../../Classes/PluginSdkboxPlayJSHelper.cpp \
../../../Classes/SDKBoxJSHelper.cpp

LOCAL_CPPFLAGS := -DSDKBOX_ENABLED
LOCAL_LDLIBS := -landroid \
-llog
LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../../Classes
LOCAL_WHOLE_STATIC_LIBRARIES := PluginSdkboxPlay \
sdkbox

LOCAL_STATIC_LIBRARIES := cocos2d_js_static

LOCAL_WHOLE_STATIC_LIBRARIES += android_native_app_glue
LOCAL_LDLIBS += -landroid
LOCAL_LDLIBS += -llog
LOCAL_WHOLE_STATIC_LIBRARIES += PluginSdkboxPlay
LOCAL_WHOLE_STATIC_LIBRARIES += sdkbox


LOCAL_EXPORT_CFLAGS := -DCOCOS2D_DEBUG=2 \
-DCOCOS2D_JAVASCRIPT

include $(BUILD_SHARED_LIBRARY)
$(call import-add-path,$(LOCAL_PATH))


$(call import-module, scripting/js-bindings/proj.android)
$(call import-module, ./sdkbox)
$(call import-module, ./pluginsdkboxplay)

Are you building with android-studio? Can you try build with commandline?
certain version of cocos2d-x will not build c++ lib with android-studio

cocos rum -p android --android-studio

yeah, Android Studio.
I’ll try in a moment

it fails with

/frameworks/runtime-src/proj.android-studio/../../cocos2d-x/cocos/./base/CCConsole.h:42:18: fatal error: thread: No such file or directory
 #include <thread>
                  ^
compilation terminated.
make: *** [obj/local/armeabi/objs-debug/cocostudio_static/CCComExtensionData.o] Error 1
make: Leaving directory `/frameworks/runtime-src/proj.android-studio/app'
Error running command, return code: 2.

might be in compatible with c++static

what does it mean?
sorry, I’m not too much familar with c++ build process((

it’s strange, but it’s compiling normally via Android Studio

@nite
Help me, Obi Van Kenobi. You’re my only hope)

Can you do the following

  1. switch back to gnustl, modify Application.mk
APP_STL := gnustl_static
  1. compile again with
cocos run -p android --android-studio

The reason you can compile with android studio before is because c++ code haven’t been compiled by android-studio at all…

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.

can you create a new project and see if it compiles at all?

can you remind me how to create new project?

I found it) Will try in a moment