Skip to content
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 #43

Open
javierpal opened this issue Oct 5, 2018 · 7 comments

Comments

@javierpal
Copy link

javierpal commented Oct 5, 2018

For some reason I get this error, the only thing i recall doing is test the ios version of the app for the first time so i installed the cocoa pods and run it in ios and it worked, then i try to run it in android again and the app does not even start, this is the complete error log.
tns platform remove/add does not seem to work either.

`FATAL EXCEPTION: main
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:5177)
                                                                              at android.app.ActivityThread.installContentProviders(ActivityThread.java:4769)
                                                                              at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4709)
                                                                              at android.app.ActivityThread.-wrap1(ActivityThread.java)
                                                                              at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1415)
                                                                              at android.os.Handler.dispatchMessage(Handler.java:102)
                                                                              at android.os.Looper.loop(Looper.java:148)
                                                                              at android.app.ActivityThread.main(ActivityThread.java:5443)
                                                                              at java.lang.reflect.Method.invoke(Native Method)
                                                                              at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:728)
                                                                              at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
                                                                           Caused by: java.lang.IllegalStateException: `
@shilik
Copy link

shilik commented Oct 9, 2018

@javierpal I've got the same errors too. I have followed the instruction stated in https://goo.gl/fQ2neu
by adding
<manifest> <application> <!-- TODO: Replace with your real AdMob app ID --> <meta-data android:name="com.google.android.gms.ads.APPLICATION_ID" android:value="ca-app-pub-################~##########"/> </application> </manifest>

But unfortunately, nothing has changed!

here you can get more info about the errors, https://ads-developers.googleblog.com/2018/10/announcing-v1700-of-android-google.html
has mentioned about the change of admob sdk.

@javierpal
Copy link
Author

javierpal commented Oct 9, 2018

@shilik it's weird because i did it too and it worked fine later, one more thing the only line you need to add is:
<meta-data android:name="com.google.android.gms.ads.APPLICATION_ID" android:value="[ADMOB_APP_ID]"/>

inside manifest/application check if you have it right. I put it at the end of the data that was already there.

@shilik
Copy link

shilik commented Oct 10, 2018

@javierpal
I have tried several times and failed until I noticed your reminder "...at the end of the data".
Finally, I got the app back to life again!
Thank you!

Repository owner deleted a comment from kingkarki Nov 22, 2018
@bereket-kassahun
Copy link

"... AT THE END OF THE MANIFEST/APPLICATION ", after two days of trial i finally get rid of the error.
grate answer thank you!!

@EddyVerbruggen
Copy link
Owner

@bereket-kassahun Just so I can make sure the instructions in this repo are still correcht, is your solution any different than adding this and the instruction here? If so, how can we make that more clear?

@TawfiqHasan
Copy link

though i put this code on my manifest file but still my app is crushed

Repository owner deleted a comment from TawfiqHasan Aug 9, 2019
@willagner
Copy link

"... AT THE END OF THE MANIFEST/APPLICATION ", after two days of trial i finally get rid of the error.
grate answer thank you!!

i had this problem to...

"... AT THE END OF THE MANIFEST/APPLICATION "

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants