- Home /
Unity Game crash on load with Fatal Exception,Unity Game Crash on load with Fatal Exception
I am using Admob to show ads and I am able to make build from Unity with no error but when I am testing in my android device Game crash on load with this error :
[8:44 PM, 8/31/2019] Mahesh Meena: java.lang.Error: FATAL EXCEPTION [main] Unity version : 2019.3.0a5 Device model : Xiaomi Redmi 5 Device fingerprint: Xiaomi/rosy/rosy:8.1.0/OPM1.171019.026/V10.3.2.0.ODAMIXM:user/release-keys
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean com.google.android.gms.ads.AdSize.equals(java.lang.Object)' on a null object reference at com.google.android.gms.internal.ads.zzxb.zza(com.google.android.gms:play-services-ads-lite@@18.2.0:246) at com.google.android.gms.internal.ads.zzxb.zza(com.google.android.gms:play-services-ads-lite@@18.2.0:85) at com.google.android.gms.ads.BaseAdView.loadAd(com.google.android.gms:play-services-ads-lite@@18.2.0:15) at com.google.android.gms.ads.AdView.loadAd(com.google.android.gms:play-services-ads-lite@@18.2.0:18) at com.google.unity.ads.Banner$5.run(Banner.java:278) at android.os.Handler.handleCallback(Handler.java:794) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:176) at android.app.ActivityThread.main(ActivityThread.java:6651) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:547) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:824)
please help
,I am using Admob to show ads and I am able to make build from unity but when I am testing in my android device Game crash on load with this error
[8:44 PM, 8/31/2019] Mahesh Meena: java.lang.Error: FATAL EXCEPTION [main] Unity version : 2019.3.0a5 Device model : Xiaomi Redmi 5 Device fingerprint: Xiaomi/rosy/rosy:8.1.0/OPM1.171019.026/V10.3.2.0.ODAMIXM:user/release-keys
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean com.google.android.gms.ads.AdSize.equals(java.lang.Object)' on a null object reference at com.google.android.gms.internal.ads.zzxb.zza(com.google.android.gms:play-services-ads-lite@@18.2.0:246) at com.google.android.gms.internal.ads.zzxb.zza(com.google.android.gms:play-services-ads-lite@@18.2.0:85) at com.google.android.gms.ads.BaseAdView.loadAd(com.google.android.gms:play-services-ads-lite@@18.2.0:15) at com.google.android.gms.ads.AdView.loadAd(com.google.android.gms:play-services-ads-lite@@18.2.0:18) at com.google.unity.ads.Banner$5.run(Banner.java:278) at android.os.Handler.handleCallback(Handler.java:794) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:176) at android.app.ActivityThread.main(ActivityThread.java:6651) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:547) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:824)
Answer by $$anonymous$$ · Sep 20, 2019 at 11:32 PM
Hi, This may be a late answer but I faced a similar issue and solver by changer the "Adsize.SmartBanner" to "Adsize.Banner"
Your answer
![](https://koobas.hobune.stream/wayback/20220612211508im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
How to properly add admob ads to a (unity) android project 0 Answers
Game crashes when calling RequestBanner() AdMob on iphone 6 0 Answers
Admob banner suddenly becomes bigger with video on its bottom!!! 0 Answers
Unity keeps trying to install SDK tools after Admob integration 0 Answers
Unity crashes when I press play (Mac) 0 Answers