Admob 7.0.1 with Mediation have App Crash
See original GitHub issue[REQUIRED] Step 1: Describe your environment
- Unity version: 2021.3.2f1
- Google Mobile Ads Unity plugin version: 7.0.1
- Platform: Android
- Platform OS version: Android 12
- Any specific devices issue occurs on:
- Mediation ad networks used, and their versions: Facebook Mediation 3.6.1
[REQUIRED] Step 2: Describe the problem
Steps to reproduce:
App is crashed when using mediation (Facebook and UnityAds also)
Log Cat
2022-05-27 18:00:23.820 19645-19711/? E/Unity: AndroidJavaException: java.lang.ClassNotFoundException: com.google.android.gms.ads.mediation.admob.AdMobExtras java.lang.ClassNotFoundException: com.google.android.gms.ads.mediation.admob.AdMobExtras at java.lang.Class.classForName(Native Method) at java.lang.Class.forName(Class.java:454) at com.unity3d.player.UnityPlayer.nativeRender(Native Method) at com.unity3d.player.UnityPlayer.access$300(Unknown Source:0) at com.unity3d.player.UnityPlayer$e$1.handleMessage(Unknown Source:95) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loopOnce(Looper.java:226) at android.os.Looper.loop(Looper.java:313) at com.unity3d.player.UnityPlayer$e.run(Unknown Source:20) Caused by: java.lang.ClassNotFoundException: com.google.android.gms.ads.mediation.admob.AdMobExtras at java.lang.Class.classForName(Native Method) at java.lang.Class.forName(Class.java:454) at com.unity3d.player.UnityPlayer.nativeRender(Native Method) at com.unity3d.player.UnityPlayer.access$300(Unknown Source:0) at com.unity3d.player.UnityPlayer$e$1.handleMessage(Unknown Source:95) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loopOnce(Looper.java:226) at android.os.Looper.loop(Looper.java:313) at com.unity3d.player.UnityPlayer$e.run(Unknown Source:20) at UnityEngine.AndroidJNISafe.CheckException () [0x00000] in <00000000000000000000000000000000>:0 at UnityEngine.AndroidJNISafe.FindClass (System.String name) [0x00000] in <00000000000000000000000000000000>
Relevant Code:
// TODO(you): code here to reproduce the problem
Issue Analytics
- State:
- Created a year ago
- Comments:7 (1 by maintainers)
Top GitHub Comments
@dhamelin we will release an update with Android V21 support shortly.
I solved this problem by changing this line into GoogleMobileAdsDependencies.xml
<androidPackage spec="com.google.android.gms:play-services-ads:20.6.0">
to this line
<androidPackage spec="com.google.android.gms:play-services-ads:[20.6.0]">