NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/ads/InterstitialAd

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By quanghuy6698

I’m trying to export and run Godot project on Android emulator, but after splash screen, it immediately crash.

I’m using ShinNil plugin (GitHub - Shin-NiL/Godot-Android-Admob-Plugin: Android AdMob plugin for Godot Game Engine 3.2 or higher) to display ads.

Here is the logcat message. I’ve tried to find this error on internet but no solutions work. Am I missing something?

Process: org.godotengine.xxx, PID: 9674
java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/ads/InterstitialAd;
at shinnil.godot.plugin.android.godotadmob.Interstitial.<init>(Interstitial.java:25)
at shinnil.godot.plugin.android.godotadmob.GodotAdMob$8.run(GodotAdMob.java:394)
at android.os.Handler.handleCallback(Handler.java:873)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6669)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)

Does anyone has faced this issue before, pls help me out.

I got similar issue but for locationservices, I already changed ‘implement’ to ‘api’ on build.gradle’s depencies, changed from Android 23 to 28, but nothing happen.

Decemberfrost | 2023-02-12 08:16