I added Unity Admob SDK v3.16 in my Unity 2019.1.0f project. It works fine on iOS 12.2, but on Android 4.2.2 I am getting the following error (pasted at the end of this message). Unfortunately I am currently unable to try on newer Android versions.
For better clarity, can you tell me if this manifest row is correct?
<meta-data android:name="com.google.android.gms.ads.APPLICATION_ID" android:value="YOUR_ADMOB_APP_ID"/> Where...
APPLICATION_ID = the "com.companyname.appname" id I can find in the Google Play Developer Console
YOUR_ADMOB_APP_ID = the "ca-app-pub-####..." code I can find on the AdMob dashboard App List
I also tried various different combinations of app ids and admob app ids but nothing seems to work.
Thanks for any help.
----- UNITY LOGCAT OUTPUT:
04/28 23:34:10.791 5007 5007 Error AndroidRuntime: FATAL EXCEPTION: main
04/28 23:34:10.791 5007 5007 Error AndroidRuntime: java.lang.RuntimeException: Unable to get provider com.google.android.gms.ads.MobileAdsInitProvider: java.lang.IllegalStateException:
04/28 23:34:10.791 5007 5007 Error AndroidRuntime:
04/28 23:34:10.791 5007 5007 Error AndroidRuntime: ******************************************************************************
04/28 23:34:10.791 5007 5007 Error AndroidRuntime: * The Google Mobile Ads SDK was initialized incorrectly. AdMob publishers *
04/28 23:34:10.791 5007 5007 Error AndroidRuntime: * should follow the instructions here:
https://goo.gl/fQ2neu to add a valid *
04/28 23:34:10.791 5007 5007 Error AndroidRuntime: * App ID inside the AndroidManifest. Google Ad Manager publishers should *
04/28 23:34:10.791 5007 5007 Error AndroidRuntime: ******************************************************************************
04/28 23:34:10.791 5007 5007 Error AndroidRuntime:
04/28 23:34:10.791 5007 5007 Error AndroidRuntime:
04/28 23:34:10.791 5007 5007 Error AndroidRuntime: at android.app.ActivityThread.installProvider(ActivityThread.java:5008)
04/28 23:34:10.791 5007 5007 Error AndroidRuntime: at android.app.ActivityThread.installContentProviders(ActivityThread.java:4618)
04/28 23:34:10.791 5007 5007 Error AndroidRuntime: at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4558)
04/28 23:34:10.791 5007 5007 Error AndroidRuntime: at android.app.ActivityThread.access$1300(ActivityThread.java:153)
04/28 23:34:10.791 5007 5007 Error AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1307)
04/28 23:34:10.791 5007 5007 Error AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:99)
04/28 23:34:10.791 5007 5007 Error AndroidRuntime: at android.os.Looper.loop(Looper.java:137)
04/28 23:34:10.791 5007 5007 Error AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:5227)
04/28 23:34:10.791 5007 5007 Error AndroidRuntime: at java.lang.reflect.Method.invokeNative(Native Method)
04/28 23:34:10.791 5007 5007 Error AndroidRuntime: at java.lang.reflect.Method.invoke(Method.java:511)
04/28 23:34:10.791 5007 5007 Error AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:795)
04/28 23:34:10.791 5007 5007 Error AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:562)
04/28 23:34:10.791 5007 5007 Error AndroidRuntime: at dalvik.system.NativeStart.main(Native Method)
04/28 23:34:10.791 5007 5007 Error AndroidRuntime: Caused by: java.lang.IllegalStateException:
04/28 23:34:10.791 5007 5007 Error AndroidRuntime:
04/28 23:34:10.791 5007 5007 Error AndroidRuntime: ******************************************************************************
04/28 23:34:10.791 5007 5007 Error AndroidRuntime: * The Google Mobile Ads SDK was initialized incorrectly. AdMob publishers *
04/28 23:34:10.791 5007 5007 Error AndroidRuntime: * should follow the instructions here:
https://goo.gl/fQ2neu to add a valid *
04/28 23:34:10.791 5007 5007 Error AndroidRuntime: * App ID inside the AndroidManifest. Google Ad Manager publishers should *
04/28 23:34:10.791 5007 5007 Error AndroidRuntime: ******************************************************************************
04/28 23:34:10.791 5007 5007 Error AndroidRuntime:
04/28 23:34:10.791 5007 5007 Error AndroidRuntime:
04/28 23:34:10.791 5007 5007 Error AndroidRuntime: at com.google.android.gms.internal.ads.zzabg.attachInfo(Unknown Source)
04/28 23:34:10.791 5007 5007 Error AndroidRuntime: at com.google.android.gms.ads.MobileAdsInitProvider.attachInfo(Unknown Source)
04/28 23:34:10.791 5007 5007 Error AndroidRuntime: at android.app.ActivityThread.installProvider(ActivityThread.java:5005)
04/28 23:34:10.791 5007 5007 Error AndroidRuntime: ... 12 more