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:
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()) {
LOGI("StartAuthorizationUI");
if (gameServices) // added ######
gameServices->StartAuthorizationUI();
}
}
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?
java.lang.NoClassDefFoundError:
at com.google.android.gms.common.util.zzf.zzg (Unknown Source)
at com.google.android.gms.common.util.zzf.zzb (Unknown Source)
at com.google.android.gms.internal.zzyd.<clinit> (Unknown Source)
at com.google.android.gms.internal.zzaog.zza (Unknown Source)
at com.google.android.gms.ads.internal.zzi.zza (Unknown Source)
at com.google.android.gms.ads.internal.zzx.zza (Unknown Source)
at com.google.android.gms.ads.internal.zzl.run (Unknown Source)
at android.os.Handler.handleCallback (Handler.java:751)
at android.os.Handler.dispatchMessage (Handler.java:95)
at android.os.Looper.loop (Looper.java:154)
at android.app.ActivityThread.main (ActivityThread.java:6776)
at java.lang.reflect.Method.invoke (Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:1496)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1386)
Caused by: java.lang.ClassNotFoundException:
at dalvik.system.BaseDexClassLoader.findClass (BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass (ClassLoader.java:380)
at java.lang.ClassLoader.loadClass (ClassLoader.java:312)
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.
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?