AdMob empty poject crashes

I code on C++ and compile on Windows 7 for Android in command prompt.

I used last stable cocos2d-x v. 3.16 with sdkbox 2.3.17.7

After Facebook asked to use their newer libraries, last two days I tried to move to cocos v. 3.17.2 with sdkbox 2.4.3.3.
After installing gradle and ninja - I’ve succeed to build and run the empty project.
But after adding into it AdMob module - the empty cpp project builds but crashes.
Installed packages:
v2.4.3.3 sdkboxads
v2.4.3.3 admob
v2.4.3.3 googleplayservices

Application.mk :: APP_STL := gnustl_static – it was c++_static

As I admit, #ifdef SDKBOX_ENABLED is not working, so SDKBOX_ENABLED is not defined nor true.

Log:
06-18 03:19:48.682 18245 18245 W dalvikvm: No implementation found for native Lcom/sdkbox/plugin/SDKBox;.nativeInit:(Ljava/lang/Object;Ljava/lang/ClassLoader;)V: com.spring.rubik1d
06-18 03:19:48.682 18245 18245 D AndroidRuntime: Shutting down VM: com.spring.rubik1d
06-18 03:19:48.682 18245 18245 W dalvikvm: threadid=1: thread exiting with uncaught exception (group=0x41966c98): com.spring.rubik1d
06-18 03:19:48.682 18245 18245 W dalvikvm: threadid=1: uncaught exception occurred: com.spring.rubik1d
06-18 03:19:48.682 18245 18245 W System.err: java.lang.UnsatisfiedLinkError: Native method not found: com.sdkbox.plugin.SDKBox.nativeInit:(Ljava/lang/Object;Ljava/lang/ClassLoader;)V: com.spring.rubik1d

It seems the native c++ code not compile.

plz try:

cocos run -p android --build-type ndk-build
1 Like

Thanks, it helped.

Seems I need to add this every build, right? (it’s a new thing for me after 3.16)

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.