Maaz Zindani

Loading the index…

↑↓ move↵ openesc close4791 pages

Flutter and app store releases · Decision guide

Android app crashes on launch because the AdMob app ID is missing

Short answer

Google Mobile Ads SDK for Android (25.x) crashes with "Missing application ID" when the final AndroidManifest.xml has no com.google.android.gms.ads.APPLICATION_ID meta-data inside <application>. Add the tag with your AdMob app ID, or Google's sample ID ca-app-pub-3940256099942544~3347511713 while testing, before you have your own. React Native and Expo apps set it in app.json, then rebuild.

  • Applies to Google Mobile Ads SDK for Android 25.5.0, google_mobile_ads plugin for Flutter, react-native-google-mobile-ads 17.4.0, Expo development builds
  • Updated
  • By Maaz Zindani, Senior Software Engineer

The Google Mobile Ads SDK reads your AdMob app ID from the app's merged AndroidManifest.xml when it starts. If the com.google.android.gms.ads.APPLICATION_ID entry is not there, it throws "Missing application ID" and the app closes before the first screen. The entry is the same for every framework; what differs is how each framework gets it into the manifest.

So begin with the manifest inside the build that crashed, then follow the branch for your stack.

Find your case

  1. If native Android, or Flutter with the google_mobile_ads pluginAdd the meta-data tag by hand inside the application element.
  2. If React Native without ExpoThe ID belongs in app.json, not in the manifest.
  3. If an Expo projectThe config plugin only runs at prebuild; you need a new native build.

Look at the manifest the phone actually got

Editing a source manifest proves nothing if the APK on the phone was built before the edit or the merger dropped the tag. apkanalyzer, in the Android SDK command-line tools, prints the manifest packaged in an APK.

Search the packaged manifest

apkanalyzer manifest print app-debug.apk | grep gms.ads.APPLICATION_ID

No output means the ID never reached this build, whatever framework you use.

Native Android and Flutter

Google's Android quick start puts the entry as a direct child of <application>, and its Flutter guide asks for the same entry in android/app/src/main/AndroidManifest.xml. A misspelled name or a tag placed outside the application element is ignored, so the SDK still sees no ID.

While you have no AdMob ID of your own, Google's quick start tells you to use its sample app ID so the app can run. Replace it with your real ID before release.

Manifest entry with the sample app ID

<application>
    <meta-data
        android:name="com.google.android.gms.ads.APPLICATION_ID"
        android:value="ca-app-pub-3940256099942544~3347511713"/>
</application>

React Native without Expo

With react-native-google-mobile-ads, a bare React Native project takes its IDs from a block in the root app.json, written with snake_case keys. The library's installation notes warn that the SDK can crash at startup when android_app_id is missing there, and they advise against pasting the ID into the manifest yourself. The Gradle build copies the value into the manifest, so a full native rebuild is needed.

app.json block

{
  "react-native-google-mobile-ads": {
    "android_app_id": "ca-app-pub-3940256099942544~3347511713",
    "ios_app_id": "ca-app-pub-xxxxxxxx~xxxxxxxx"
  }
}

Expo needs a fresh native build

In Expo the IDs go on the library's config plugin entry, with camelCase keys such as androidAppId. The plugin writes the manifest entry during prebuild, so changing app.json changes nothing on a phone running an older build. Expo Go cannot load this native module at all; use a development build.

Regenerate the native project and install a new build

npx expo install expo-dev-client
npx expo prebuild
npx expo run:android

If the key is present and it still crashes

Read the whole stack trace in Logcat. A different exception printed above or below the ad error is a separate problem, and fixing the ID will not touch it.

In short

  • The tag name must be exactly com.google.android.gms.ads.APPLICATION_ID, inside <application>.
  • Use Google's sample ID until you have your own, then swap it before release.
  • Confirm with apkanalyzer on the installed APK, not the source tree.

Sources

How was this page made?

I drafted this page with AI assistance from the official documents listed under Sources. I have not reproduced this fix on a machine of my own yet, so read it as documented guidance, not a test report. Found a mistake? Tell me.

Next step

Want a second pair of eyes on it?

Send me the error and what changed before it started. I reply within 24 hours.