New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to get provider com.google.android.gms.ads.MobileAdsInitProvider: java.lang.IllegalStateException: #23102

Open
kwmt opened this Issue Oct 15, 2018 · 1 comment

Comments

Projects
None yet
3 participants
@kwmt
Contributor

kwmt commented Oct 15, 2018

Steps to Reproduce

  1. Added firebase_admob: ^0.6.1+1
  2. build admob sample, install to Android device and run app
  3. crashed

Logs

10-16 00:11:47.879 24660 24660 E AndroidRuntime: java.lang.RuntimeException: Unable to get provider com.google.android.gms.ads.MobileAdsInitProvider: java.lang.IllegalStateException: 
10-16 00:11:47.879 24660 24660 E AndroidRuntime: 
10-16 00:11:47.879 24660 24660 E AndroidRuntime: ******************************************************************************
10-16 00:11:47.879 24660 24660 E AndroidRuntime: * The Google Mobile Ads SDK was initialized incorrectly. AdMob publishers    *
10-16 00:11:47.879 24660 24660 E AndroidRuntime: * should follow the instructions here: https://goo.gl/fQ2neu to add a valid  *
10-16 00:11:47.879 24660 24660 E AndroidRuntime: * App ID inside the AndroidManifest. Google Ad Manager publishers should     *
10-16 00:11:47.879 24660 24660 E AndroidRuntime: * follow instructions here: https://goo.gl/h17b6x.                           *
10-16 00:11:47.879 24660 24660 E AndroidRuntime: ******************************************************************************
10-16 00:11:47.879 24660 24660 E AndroidRuntime: 
10-16 00:11:47.879 24660 24660 E AndroidRuntime: 
10-16 00:11:47.879 24660 24660 E AndroidRuntime: 	at android.app.ActivityThread.installProvider(ActivityThread.java:6396)
10-16 00:11:47.879 24660 24660 E AndroidRuntime: 	at android.app.ActivityThread.installContentProviders(ActivityThread.java:5938)
10-16 00:11:47.879 24660 24660 E AndroidRuntime: 	at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5853)
10-16 00:11:47.879 24660 24660 E AndroidRuntime: 	at android.app.ActivityThread.access$1100(ActivityThread.java:199)
10-16 00:11:47.879 24660 24660 E AndroidRuntime: 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1650)
10-16 00:11:47.879 24660 24660 E AndroidRuntime: 	at android.os.Handler.dispatchMessage(Handler.java:106)
10-16 00:11:47.879 24660 24660 E AndroidRuntime: 	at android.os.Looper.loop(Looper.java:193)
10-16 00:11:47.879 24660 24660 E AndroidRuntime: 	at android.app.ActivityThread.main(ActivityThread.java:6669)
10-16 00:11:47.879 24660 24660 E AndroidRuntime: 	at java.lang.reflect.Method.invoke(Native Method)
10-16 00:11:47.879 24660 24660 E AndroidRuntime: 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
10-16 00:11:47.879 24660 24660 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
10-16 00:11:47.879 24660 24660 E AndroidRuntime: Caused by: java.lang.IllegalStateException: 
10-16 00:11:47.879 24660 24660 E AndroidRuntime: 
10-16 00:11:47.879 24660 24660 E AndroidRuntime: ******************************************************************************
10-16 00:11:47.879 24660 24660 E AndroidRuntime: * The Google Mobile Ads SDK was initialized incorrectly. AdMob publishers    *
10-16 00:11:47.879 24660 24660 E AndroidRuntime: * should follow the instructions here: https://goo.gl/fQ2neu to add a valid  *
10-16 00:11:47.879 24660 24660 E AndroidRuntime: * App ID inside the AndroidManifest. Google Ad Manager publishers should     *
10-16 00:11:47.879 24660 24660 E AndroidRuntime: * follow instructions here: https://goo.gl/h17b6x.                           *
10-16 00:11:47.879 24660 24660 E AndroidRuntime: ******************************************************************************
10-16 00:11:47.879 24660 24660 E AndroidRuntime: 
10-16 00:11:47.879 24660 24660 E AndroidRuntime: 
10-16 00:11:47.879 24660 24660 E AndroidRuntime: 	at com.google.android.gms.internal.ads.zzmn.attachInfo(Unknown Source:17)
10-16 00:11:47.879 24660 24660 E AndroidRuntime: 	at com.google.android.gms.ads.MobileAdsInitProvider.attachInfo(Unknown Source:3)
10-16 00:11:47.879 24660 24660 E AndroidRuntime: 	at android.app.ActivityThread.installProvider(ActivityThread.java:6391)
10-16 00:11:47.879 24660 24660 E AndroidRuntime: 	... 10 more
% flutter doctor -v
[✓] Flutter (Channel beta, v0.9.4, on Mac OS X 10.14 18A391, locale en-JP)
    • Flutter version 0.9.4 at /usr/local/flutter
    • Framework revision f37c235c32 (3 weeks ago), 2018-09-25 17:45:40 -0400
    • Engine revision 74625aed32
    • Dart version 2.1.0-dev.5.0.flutter-a2eb050044

[✓] Android toolchain - develop for Android devices (Android SDK 28.0.2)
    • Android SDK at /Users/kwmt/Library/Android/sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-28, build-tools 28.0.2
    • ANDROID_HOME = /Users/kwmt/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06)
    • All Android licenses accepted.

[✓] iOS toolchain - develop for iOS devices (Xcode 10.0)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 10.0, Build version 10A255
    • ios-deploy 1.9.2
    • CocoaPods version 1.5.3

[✓] Android Studio (version 3.2)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 29.1.1
    • Dart plugin version 181.5656
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06)

[✓] VS Code (version 1.27.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 2.18.0

[!] Connected devices
    ! No devices available

! Doctor found issues in 1 category.

Cause

Starting in version 17.0.0, if you are an AdMob publisher you are now required to add your AdMob app ID in your AndroidManifest.xml file.

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

flutter/plugins@6028d51#diff-55e57e4cc093f5d374b2d3052e10712aL35

Actually, I added my AdMob app ID in the file, it stopped crashing.

@adilthree

This comment has been minimized.

adilthree commented Nov 13, 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment