Here is an android log
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)
please add this line in your project AndroidManifest.xml
inside <application>
<meta-data android:name="com.google.android.gms.ads.APPLICATION_ID" android:value="[appid here]"/>
Thanks @Suraj-Tiwari . It worked for me
It worked for me too, however i think its not sufficient to make the ad placement work again.
The app works fine, but no more banner are showing. I've been waiting for 2 days...but nothing... banner does not load, so i think there is something missing, it's not just a matter of time.
Thanks, @Suraj-Tiwari . It's work perfectly
@scaralfred I get the same errors. Did you fix it yet?
@NySiya Yes. It has just taken 3 days..... For the banner to show up again. After you add the app code on the manifest file, as mentioned above, the app will work again, you just need to wait up to 3 days to see the banner again :) this was my case. Maybe your banner will take less
@scaralfred Thank so much for this reply. But it takes almost 2 weeks now, my Banners still doesn't show up :(
are you using correct id?
@Suraj-Tiwari Only MREC show up, while other doesn't till now :(
You find grade.build in node_module/react-native-admob/android
change: gg service: + ====> gg service: 15.0.0
@Suraj-Tiwari workaround works fine :) Don't understand why this is not in the readme..
please add this line in your project
AndroidManifest.xmlinside
<application>
<meta-data android:name="com.google.android.gms.ads.APPLICATION_ID" android:value="[appid here]"/>
It Works
Just for reference that we have to copy AppID from AdMob Account.
Thanks @Suraj-Tiwari
please add this line in your project
AndroidManifest.xmlinside
<application>
<meta-data android:name="com.google.android.gms.ads.APPLICATION_ID" android:value="[appid here]"/>
Thanks, it works!
I wasted many hours on this problem.
This solution is perfect!
Fyi, Appid inside AndroidManifest.xml should have a '~' delimiter, not '/'.
I've added a link to the documentation in the Android section of the README
I faced the same issue and none of these helped me. In my case the issue caused by "The ad unit ID must be set on InterstitialAd before loadAd is called" Error.
So, be sure you call .requestAd() after .setAdUnitID(). And be sure that .setAdUnitID() incoming param is not either undefined or null or empty string or an object etc.
The problem is that react-native-admob doesn't pass any exceptions to the user and cause immediate crash in case of any problem.
Try to Use Android Device Monitor to get more information about your case.
please add this line in your project
AndroidManifest.xmlinside
<application>
<meta-data android:name="com.google.android.gms.ads.APPLICATION_ID" android:value="[appid here]"/>
Thank you @Suraj-Tiwari . It worked for me
@Suraj-Tiwari, I got this error after adding the meta-data tag to my AndroidManifest.xml's <application>:
Manifest merger failed : Attribute meta-data#com.google.android.gms.ads.APPLICATION_ID@value value=(ca-app-pub-5648488638118120~5124900918) from AndroidManifest.xml:13:75-129
is also present at [:react-native-firebase_admob] AndroidManifest.xml:18:13-29 value=().
Suggestion: add 'tools:replace="android:value"' to <meta-data> element at AndroidManifest.xml:13:7-131 to override.
IN
...\android\appsrc\mainAndroidManifest.xml
CHANGE
<meta-data
android:name="com.google.android.gms.ads.APPLICATION_ID"
android:value="ca-app-pub-3940256099942544/**********"/>
TO
<meta-data
android:name="com.google.android.gms.ads.APPLICATION_ID"
android:value="ca-app-pub-3940256099942544~**********"/>
Change: / to ~
Most helpful comment
please add this line in your project
AndroidManifest.xmlinside
<application><meta-data android:name="com.google.android.gms.ads.APPLICATION_ID" android:value="[appid here]"/>