Created
January 1, 2019 08:56
-
-
Save masaibar/cb0286d598b220e85a5bb44e0e9e2001 to your computer and use it in GitHub Desktop.
AndroidでAdMobの初期化時にクラッシュする ref: https://qiita.com/masaibar/items/848362349442026063e2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<manifest> | |
<application> | |
: | |
(中略) | |
: | |
<meta-data | |
android:name="com.google.android.gms.ads.APPLICATION_ID" | |
android:value="ADMOB_APP_ID"/> | |
</application> | |
</manifest> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MobileAds.initialize(this, ADMOB_APP_ID) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// implementation 'com.google.firebase:firebase-ads:16.0.1' ←アップデート前 | |
implementation 'com.google.firebase:firebase-ads:17.1.2' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2019-01-01 17:15:30.332 30306-30306/? E/AndroidRuntime: FATAL EXCEPTION: main | |
Process: com.masaibar.sample, PID: 30306 | |
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:6445) | |
at android.app.ActivityThread.installContentProviders(ActivityThread.java:5987) | |
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5902) | |
at android.app.ActivityThread.access$1100(ActivityThread.java:200) | |
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1656) | |
at android.os.Handler.dispatchMessage(Handler.java:106) | |
at android.os.Looper.loop(Looper.java:193) | |
at android.app.ActivityThread.main(ActivityThread.java:6718) | |
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: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment