question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

java.lang.RuntimeException: Unable to get provider com.google.android.gms.ads.MobileAdsInitProvider

See original GitHub issue

Why suddenly GMS started to appear in my Cordova Android build process and throws this error in Android Studio when i run an emulator?

I/System.out: waiting for debugger to settle...
I/System.out: debugger has settled (1447)
D/AndroidRuntime: Shutting down VM
E/AndroidRuntime: FATAL EXCEPTION: main
    Process: ru.balumates.balu, PID: 4409
    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://goo.gl/fQ2neu to add a valid  *
    * App ID inside the AndroidManifest. Google Ad Manager publishers should     *
    * follow instructions here: https://goo.gl/h17b6x.                           *
    ******************************************************************************
    
    
        at android.app.ActivityThread.installProvider(ActivityThread.java:6242)
        at android.app.ActivityThread.installContentProviders(ActivityThread.java:5805)
        at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5722)
        at android.app.ActivityThread.-wrap1(Unknown Source:0)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1656)
        at android.os.Handler.dispatchMessage(Handler.java:106)
        at android.os.Looper.loop(Looper.java:164)
        at android.app.ActivityThread.main(ActivityThread.java:6494)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
     Caused by: java.lang.IllegalStateException: 
    
    ******************************************************************************
    * The Google Mobile Ads SDK was initialized incorrectly. AdMob publishers    *
    * should follow the instructions here: https://goo.gl/fQ2neu to add a valid  *
    * App ID inside the AndroidManifest. Google Ad Manager publishers should     *
    * follow instructions here: https://goo.gl/h17b6x.                           *
    ******************************************************************************
    
    
        at com.google.android.gms.internal.ads.zzmn.attachInfo(Unknown Source:17)
        at com.google.android.gms.ads.MobileAdsInitProvider.attachInfo(Unknown Source:3)
        at android.app.ActivityThread.installProvider(ActivityThread.java:6239)
        	... 10 more
Disconnected from the target VM, address: 'localhost:8600', transport: 'socket'

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:12

github_iconTop GitHub Comments

13reactions
krcma96commented, Oct 12, 2018

They have updated the AdMob SDK, you have to add your appID in the AndroidManifest

<application> . . . <meta-data android:name="com.google.android.gms.ads.APPLICATION_ID" android:value="ca-app-pub-################~##########"/> </application>

https://ads-developers.googleblog.com/2018/10/announcing-v1700-of-android-google.html

This fixed the crash but for some reason ads won’t load for me, please let me know if you experience the same issue.

6reactions
TruptiLondhecommented, Dec 4, 2018

compile ‘com.google.android.gms:play-services-ads:12.0.0’ add this dependency your sdk is low for your dependency. I faced this problem now i add this my problem solved

its worked for my app

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to get provider com.google.android.gms.ads ...
This happened due to updated AdMob SDK. Now you need to add appID in your manifest file. <application> .
Read more >
Unable to get provider com.google.android.gms.ads ... - GitHub
RuntimeException : Unable to get provider com.google.android.gms.ads.MobileAdsInitProvider: java.lang.IllegalStateException #614.
Read more >
Unable to get provider com.google.android.gms.ads ...
MobileAdsInitProvider : java.lang.IllegalStateException: Hey! I have an app in Xamarin.Forms (Android & iOS), but this only concerns the Android ...
Read more >
Unable to get provider com google android gms ads ...
java. lang. RuntimeException : Unable to get provider com. google. android. gms. ads. MobileAdsInitProvider : java.lang.IllegalStateException:
Read more >
Crash - The Google Mobile Ads SDK was initialized incorrectly.
10-25 00:28:35.292 26017 26017 E AndroidRuntime: java.lang.RuntimeException: Unable to get provider com.google.android.gms.ads.MobileAdsInitProvider: ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found