Didn't find class "com.google.android.gms.ads.internal.client.LiteSdkInfo" when using Google Mobile Ads SDK
Asked Answered
C

1

6

I'm getting the error below which I believe is coming from google mobile ads sdk:

E/Ads: Failed to retrieve lite SDK info.
    java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.ads.internal.client.LiteSdkInfo" on path: DexPathList[[zip file "/data/app/~~AkgGqulaWLZ1A0aJbj6lcg==/ca.used-33LOn7ZdeyTUBp3TFol1sw==/base.apk"],nativeLibraryDirectories=[/data/app/~~AkgGqulaWLZ1A0aJbj6lcg==/ca.used-33LOn7ZdeyTUBp3TFol1sw==/lib/arm64, /data/app/~~AkgGqulaWLZ1A0aJbj6lcg==/ca.used-33LOn7ZdeyTUBp3TFol1sw==/base.apk!/lib/arm64-v8a, /system/lib64, /system/system_ext/lib64, /product/lib64]]
        at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:207)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
        at com.google.android.gms.ads.nonagon.util.q.e(:com.google.android.gms.policy_ads_fdr_dynamite@[email protected]:8)
        at com.google.android.gms.ads.nonagon.util.q.c(:com.google.android.gms.policy_ads_fdr_dynamite@[email protected]:40)
        at com.google.android.gms.ads.nonagon.a.s(:com.google.android.gms.policy_ads_fdr_dynamite@[email protected]:15)
        at com.google.android.gms.ads.nonagon.a.b(:com.google.android.gms.policy_ads_fdr_dynamite@[email protected]:5)
        at com.google.android.gms.ads.ChimeraMobileAdsSettingManagerCreatorImpl.getMobileAdsSettingManager(:com.google.android.gms.policy_ads_fdr_dynamite@[email protected]:52)
        at com.google.android.gms.ads.internal.client.bx.bO(:com.google.android.gms.policy_ads_fdr_dynamite@[email protected]:40)
        at m.aiu.onTransact(:com.google.android.gms.policy_ads_fdr_dynamite@[email protected]:21)
        at android.os.Binder.transact(Binder.java:1052)
        at msh.ge(:com.google.android.gms@[email protected] (150400-580326705):8)
        at com.google.android.gms.ads.internal.client.ay.getMobileAdsSettingManager(:com.google.android.gms@[email protected] (150400-580326705):12)
        at com.google.android.gms.ads.MobileAdsSettingManagerCreatorImpl.getMobileAdsSettingManager(:com.google.android.gms@[email protected] (150400-580326705):42)
        at com.google.android.gms.ads.internal.client.az.fe(:com.google.android.gms@[email protected] (150400-580326705):40)
        at msi.onTransact(:com.google.android.gms@[email protected] (150400-580326705):122)
        at android.os.Binder.transact(Binder.java:1052)
        at com.google.android.gms.internal.ads.zzhs.zzbq(com.google.android.gms:play-services-ads-base@@20.3.0:2)
        at com.google.android.gms.internal.ads.zzbgj.zze(com.google.android.gms:play-services-ads-lite@@20.3.0:4)
        at com.google.android.gms.internal.ads.zzbia.zza(com.google.android.gms:play-services-ads-lite@@20.3.0:3)
        at com.google.android.gms.internal.ads.zzben.zzb(com.google.android.gms:play-services-ads-lite@@20.3.0:13)
        at com.google.android.gms.internal.ads.zzbeu.zzf(com.google.android.gms:play-services-ads-lite@@20.3.0:1)
        at com.google.android.gms.internal.ads.zzbeu.zzd(com.google.android.gms:play-services-ads-lite@@20.3.0:11)
        at com.google.android.gms.internal.ads.zzbhv.zzw(com.google.android.gms:play-services-ads-lite@@20.3.0:3)
        at com.google.android.gms.internal.ads.zzbhv.zzb(com.google.android.gms:play-services-ads-lite@@20.3.0:8)
        at com.google.android.gms.ads.MobileAds.initialize(com.google.android.gms:play-services-ads-lite@@20.3.0:3)
        at ca.used.main.MainActivity.onCreate(MainActivity.java:156)
        at android.app.Activity.performCreate(Activity.java:8104)
        at android.app.Activity.performCreate(Activity.java:8088)
        at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1309)
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3479)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3681)
        at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:85)
        at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
E/Ads:     at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2130)
        at android.os.Handler.dispatchMessage(Handler.java:106)
        at android.os.Looper.loop(Looper.java:250)
        at android.app.ActivityThread.main(ActivityThread.java:7803)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:958)

I do not understand why It's showing issues with "com.google.android.gms.ads.internal.client.LiteSdkInfo" as it's no where in the code base.

Below are what I've configured:

build.gradle (app):

implementation 'com.google.android.gms:play-services-ads:20.3.0'

build.gradle (project)

buildscript {
    repositories {
        google()
        mavenCentral()
    }
}

allprojects {
    repositories {
        google()
        mavenCentral()
    }
}

AndroidManifest.xml:

<uses-permission android:name="com.google.android.gms.permission.AD_ID" />

<meta-data
            android:name="com.google.android.gms.ads.APPLICATION_ID"
            android:value="THE_VALUE" />

MainActivity.java:

import com.google.android.gms.ads.MobileAds;
import com.google.android.gms.ads.initialization.InitializationStatus;
import com.google.android.gms.ads.initialization.OnInitializationCompleteListener;


MobileAds.initialize(this, new OnInitializationCompleteListener() {
            @Override
            public void onInitializationComplete(InitializationStatus initializationStatus) {
            }
        });
Climacteric answered 17/11, 2023 at 22:38 Comment(0)
C
5

Try changing the version from

implementation 'com.google.android.gms:play-services-ads:20.3.0'

to

implementation 'com.google.android.gms:play-services-ads:22.4.0'
Closeup answered 2/12, 2023 at 22:0 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.