Google gms crash on some Android devices

Google gms crash on some Android devices
0

After solving the issues to make AdMob reward videos work (thanks @yinjimmy :slight_smile: see topic here: SDKBOX AdMob + Google Play Service) and after rolling the update to the Play Store, I am getting the following crash in some devices:

Fatal Exception: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/common/internal/zzbq;
   at com.google.android.gms.internal.zzcka.<init>(:3)
   at com.google.android.gms.measurement.AppMeasurementInstallReferrerReceiver.onReceive(:6)
   at android.app.ActivityThread.handleReceiver(ActivityThread.java:3636)
   at android.app.ActivityThread.access$1400(ActivityThread.java:237)
   at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1878)
   at android.os.Handler.dispatchMessage(Handler.java:106)
   at android.os.Looper.loop(Looper.java:224)
   at android.app.ActivityThread.main(ActivityThread.java:7070)
   at java.lang.reflect.Method.invoke(Method.java)
   at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:536)
   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:928)

I have read that it could be due to a versions mismatch issue, but on my devices is working fine (Xiaomi Android9 and BQ Android6), so I have no idea on how to debug this…

Cocos2dx version 3.16
SDKBOX v1.0.3.1
plugins: 2.5.0.5 (IAP, AdColony, AdMob, Firebase, OneSignal)
buildTools and compileVersion 28
minSdkVersion 23
dependencies:

dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation project(':libcocos2dx')

    implementation 'com.crashlytics.sdk.android:crashlytics:2.9.9'
    implementation 'com.crashlytics.sdk.android:crashlytics-ndk:2.0.2'
    implementation 'com.android.billingclient:billing:2.0.1'
    implementation 'com.google.android.gms:play-services-basement:16.0.1'
    implementation 'com.google.android.gms:play-services-ads-base:17.2.0'
    implementation 'com.google.android.gms:play-services-ads:17.2.0'
}

Any help will be appreciated, thanks!

need to be same version ?

I’ll try that and let you know. TBH I had forgotten about that dependency because it was added automatically by importing a SDKBOX plugin from the CLI…

I think I’ve fixed it, or at least I haven’t seen any crashes since the update rollout. One thing though: com.google.android.gms:play-services-ads-base:17.2.0 does not exist, so I’ve used 17.1.0. Also, the firebase sdkbox plugin says in the docs that uses version 15.0.0, which could also be a problem, so I removed the sdkbox-firebase.jar and added implementation ‘com.google.firebase:firebase-analytics:17.2.0’. Here is the final dependencies:

implementation 'com.crashlytics.sdk.android:crashlytics:2.9.9'
implementation 'com.crashlytics.sdk.android:crashlytics-ndk:2.0.2'
implementation 'com.android.billingclient:billing:2.0.1'
implementation 'com.google.android.gms:play-services-basement:17.1.0'
implementation 'com.google.android.gms:play-services-ads-base:17.2.0'
implementation 'com.google.android.gms:play-services-ads:17.2.0'
implementation 'com.google.firebase:firebase-analytics:17.2.0'
2 Likes

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