Manifest merger failed 🤖 Android

Manifest merger failed: android:exported needs to be explicitly specified

Targeting Android 12 (API 31)+ requires android:exported on every activity, service or receiver that has an intent-filter.

Seen on: Android

Meaning

The merged manifest (your app + all libraries) is invalid. The exported rule is the most common cause after raising targetSdk; others are conflicting attribute values between libraries (fix with tools:replace).

Common causes

  • targetSdk ≥ 31 with intent-filter components missing android:exported
  • Old library declaring components without exported
  • Conflicting attributes between app and library manifests (label, icon, allowBackup)
  • minSdk lower than a library’s minSdk

⚡ Quick fix

  1. Add android:exported="true" (launcher activity) or "false" to each component with an intent-filter
  2. Update libraries that declare un-exported components
  3. Open the “Merged Manifest” tab in Android Studio to see which library is at fault
  4. Use tools:replace / tools:overrideLibrary for attribute conflicts

Detailed fix by platform

Android

  1. AndroidManifest.xml:
    xml
    <activity android:name=".MainActivity" android:exported="true">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
    <receiver android:name=".BootReceiver" android:exported="false">…</receiver>

How to diagnose

  1. Message — Which component/attribute is named?
  2. Merged manifest — Which library contributes it?
  3. SDK — targetSdk and minSdk vs libraries

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.