GPG app crashes, please fix some internal code

GPG app crashes, please fix some internal code


Hello. My released GPG app works ok on most devices.
But there are some devices with restricted rights for a user. On them my app crashes (I had to unpublish it).
App stops to crash, after I comment in my code a lot of gpg code; the last was this line:

bool AppDelegate::applicationDidFinishLaunching() {
	// sdkbox::PluginGPG::init(); //---this line;

I’m using GPG sample, I had to fix there few places with code like this:
(taken from StateManager.cpp)

void StateManager::SignIn() {
    if (gameServices) // added ######
    if (!gameServices->IsAuthorized()) {
        if (gameServices) // added ######

I use cocos v. 3.16 and sdkbox modules (gpg, googleplayservices and others) v. v2.4.0.2
I tried to use last cocos+sdkbox modules - no success even with empty project.

Please inform me, when it may be fixed (make some pointers check before using them and may be something more) : your sdkbox-sample-gpg and most important - some internal code in sdkbox?


The log from the crashing (Android) device:

  at (Unknown Source)
  at (Unknown Source)
  at<clinit> (Unknown Source)
  at (Unknown Source)
  at (Unknown Source)
  at (Unknown Source)
  at (Unknown Source)
  at android.os.Handler.handleCallback (
  at android.os.Handler.dispatchMessage (
  at android.os.Looper.loop (
  at (
  at java.lang.reflect.Method.invoke (Native Method)
  at$ (
  at (
Caused by: java.lang.ClassNotFoundException: 
  at dalvik.system.BaseDexClassLoader.findClass (
  at java.lang.ClassLoader.loadClass (
  at java.lang.ClassLoader.loadClass (

Chm… Or may it crash because of AdMob module??


Seems like my app crashes (on that only device) because of the restrictions (of user permissions, I suppose).
On that device I can’t install any game from Google Play. But crashing app is a Tool, so device allow to install it.

On that device my app starts ok, if I comment sdkbox::PluginAdMob::init(); and all AdMob activity functions. All other sdkbox modules does not crash (facebook, IAP, GPG).
And my app crashes if I comment everything except sdkbox::PluginAdMob::init(); - that surprised me.

AndroidManifest.xml asks for a standard permissions.

Please close this ticket / topic.
And please fix all the code, there pointer been used without checking is it null. :slight_smile:


make sure your project dependency on GPS

implementation ''


Thanks, but:

I’ve asked “is it working?” here:

As I remember, it takes for me too much time to use something new in Cocos, to make it work. So I usually wait for stable version and instructions.
I have not succeed to build cpp project (on Win7) with cocos 3.17 (with gradle) after import gpg.
Is it possible?


please use NDK r16 to compile