- Home /
App crash on launch.
Hi, my android application closes directly even before the splash image. Everything works fine in the editor. Before having the error I deleted the admob and firebase plugins since no ads were shown in my app (I have made a couple of apps and the code works perfectly).
I re-imported the admob and firebase plugins and now the application closes immediately. I don't know if I deleted something that I shouldn't have. I have my app ID set in the Google Mobile Ads settings. Everything is as before, and it should work.
I have connected my phone to Logcat and I get the following errors:
E/AndroidRuntime: FATAL EXCEPTION: main Process: com.company.appname(write by me), PID: 4911 java.lang.RuntimeException: Unable to get provider com.google.android.gms.ads.MobileAdsInitProvider: java.lang.IllegalStateException:
******************************************************************************
* The Google Mobile Ads SDK was initialized incorrectly. AdMob publishers *
* should follow the instructions here: *
* https://googlemobileadssdk.page.link/admob-android-update-manifest *
* to add a valid App ID inside the AndroidManifest. *
* Google Ad Manager publishers should follow instructions here: *
* https://googlemobileadssdk.page.link/ad-manager-android-update manifest. *
******************************************************************************
at android.app.ActivityThread.installProvider(ActivityThread.java:7607)
at android.app.ActivityThread.installContentProviders(ActivityThread.java:7125)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:7009)
at android.app.ActivityThread.access$1700(ActivityThread.java:274)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2098)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:233)
at android.app.ActivityThread.main(ActivityThread.java:8068)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:631)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:978)
Caused by: java.lang.IllegalStateException:
******************************************************************************
* The Google Mobile Ads SDK was initialized incorrectly. AdMob publishers *
* should follow the instructions here: *
* https://googlemobileadssdk.page.link/admob-android-update-manifest *
* to add a valid App ID inside the AndroidManifest. *
* Google Ad Manager publishers should follow instructions here: *
* https://googlemobileadssdk.page.link/ad-manager-android-update-manifest. *
******************************************************************************
at com.google.android.gms.internal.ads.zzzj.attachInfo(com.google.android.gms:play-services-ads-lite@@19.5.0:31)
at com.google.android.gms.ads.MobileAdsInitProvider.attachInfo(com.google.android.gms:play-services-ads-lite@@19.5.0:3)
at android.app.ActivityThread.installProvider(ActivityThread.java:7602)
... 10 more.
Thank you very much in advance :)
Hi, I have the same issue. Did you find a solution? thanks for any help :)
Answer by dondon · Nov 30, 2021 at 02:41 PM
Ahhh I found it. Had the same issue with 6.1.2. Looks like there is an error in the code. In your plugin folder rename "GoogleMobileAdsPlugin" to "GoogleMobileAdsPlugin.androidlib" Then build. You will see some scripts making errors. Replace in the scripts again "GoogleMobileAdsPlugin" to "GoogleMobileAdsPlugin.androidlib". Build again . Now it works.
Have fun Roberto
Your answer
Follow this Question
Related Questions
Using Ad plugins on Android leads to extra crashes 0 Answers
JAVA_HOME enviroment preferences error with Embedded JDK in unity preferences/external tools 0 Answers
Game crashes on player death 0 Answers
Game crashes after showing intersitial and rewarded ads 0 Answers
My android game crashes 0 Answers