新品価格 |
AndroidアプリにFirebase Crashlyticsを入れてみた
の続編
最後はFirebase対応のAdmobを入れてみた
・やり方
https://firebase.google.com/docs/admob/admob-firebase?hl=ja
・エラー
admob入れたら以下のエラーが出た
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
java.lang.RuntimeException: Unable to get provider com.google.android.gms.ads.MobileAdsInitProvider: java.lang.IllegalStateException: ****************************************************************************** * Invalid application ID. Follow instructions here: https://goo.gl/fQ2neu to * * find your app ID. * ****************************************************************************** at android.app.ActivityThread.installProvider(ActivityThread.java:6396) at android.app.ActivityThread.installContentProviders(ActivityThread.java:5938) at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5853) at android.app.ActivityThread.access$1100(ActivityThread.java:199) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1650) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loop(Looper.java:193) at android.app.ActivityThread.main(ActivityThread.java:6669) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858) Caused by: java.lang.IllegalStateException: ****************************************************************************** * Invalid application ID. Follow instructions here: https://goo.gl/fQ2neu to * * find your app ID. * ****************************************************************************** at com.google.android.gms.internal.ads.zzze.attachInfo(Unknown Source:20) at com.google.android.gms.ads.MobileAdsInitProvider.attachInfo(Unknown Source:3) at android.app.ActivityThread.installProvider(ActivityThread.java:6391) ... 10 more |
・エラーの対応
metaを追加したら対応できた
広告のIDとapplication idは別なので注意
https://developers.google.com/admob/android/quick-start#update_your_androidmanifestxml
これにて一通りFirebase対応は終わり
後はリリースして様子見します