Skip to main content

AdMob Crash

Android Studio: **All versions **| Appodeal SDK: All versions

If the app crashes on startup, check the logs from your device. Connect a device with the app installed, open the Android Studio Logcat console, run the app and check the logs. For more information about the console please visit Debugging with Android Studio.

The following crash happens if AdMob App Id has not been specified in AndroidManifest.xml file, which is required for AdMob integration. Appodeal SDK contains AdMob adapters by default.

The crash log example:

java.lang.RuntimeException: Unable to get provider java.lang.IllegalStateException:

* The Google Mobile Ads SDK was initialized incorrectly. AdMob publishers *
* should follow the instructions here: *
* *
* to add a valid App ID inside the AndroidManifest. *
* Google Ad Manager publishers should follow instructions here: *
* *

at android.os.Handler.dispatchMessage(
at android.os.Looper.loop(
at java.lang.reflect.Method.invoke(Native Method)
Caused by: java.lang.IllegalStateException:



Use AdMob Adapter In Your App

If you are planning to use AdMob in your app - add AdMob App ID to meta-data tag in AndroidManifest.xml:

<!-- Add your AdMob App ID -->

AdMob App ID is the unique ID assigned to your app.

To find the AdMob App ID in your AdMob account, go to Apps → Your Application → App Settings and copy the AdMob App ID.


Before using AdMob make sure to complete the steps from our AdMob integration guide and AdMob sync guide.

Remove AdMob Adapter From Your App

If you are not planning to use AdMob in your app complete the following steps:

  1. Go to Configure Mediated Networks guide, uncheck AdMob network and generate a new build.gradle file.
  1. Additionally, you need to manually exclude Play Services Ads and use the build.gradle file with the following setup:
implementation("") {
exclude(group = "", module = "admob")
exclude(group = "", module = "play-services-ads")