I tried to implement AdMob to my game,
I was not able to add it to my game at first try,
so I decided to make a fresh cocos project then add plugins that I need,
and then use it as a template.
So, I made a fresh cocos2d-x project using the command line,
then added the AdMob plugin using SDKBox GUI,
then opened it in Android Studio and tried to run it on my device.
But the game crashes on launch with this error:
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 com.sdkbox.plugin.SDKBoxActivity.onCreate(SDKBoxActivity.java:13)
at org.cocos2dx.cpp.AppActivity.onCreate(AppActivity.java:38)
at android.app.Activity.performCreate(Activity.java:5982)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1105)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2268)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2375)
at android.app.ActivityThread.access$900(ActivityThread.java:147)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1283)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5253)
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:913)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:708)
My environment info:
Win 10
Android Studio 3.4.2
JRE 1.8.0_152
Cmake 3.6
NDK r16
Cocos2d-x 3.17.2
SDKBox GUI 1.1.7
Thanks