Maaz Zindani

Loading the index…

↑↓ move↵ openesc close4072 pages
Flutter and app store releases

Manifest merger failed because a component with an intent filter has no android:exported

ErrorManifest merger failed : Apps targeting Android 12 and higher are required to specify an explicit value for android:exported when the corresponding component has an intent filter defined.

Short answer

When your app targets Android 12 (API 31) or higher, every activity, service and broadcast receiver that has an intent filter must declare android:exported. The build stops until it does. Set true for the launcher activity and usually false for the rest. If the component comes from a library, override it in your own manifest.

  • Applies to Android Studio current stable, Android Gradle Plugin 8.x, targetSdk 31 or higher
  • Updated
  • By Maaz Zindani, Senior Software Engineer

Fix it fast

  1. 1Find out which cause you have

    Read the manifest merger report. It names the exact component and the manifest file it came from, which tells you whether it is yours or a library's.

    grep -n -B2 -A4 "exported" app/build/outputs/logs/manifest-merger-debug-report.txt
  2. 2Match what you see, then jump to its fix

    1. 1The report points at your app's src/main/AndroidManifest.xml.Your own activity, service or receiver has an intent filter but no android:exportedFix
    2. 2The merging report shows the component coming from a library manifest, not from your src folder.A library's manifest declares a component without android:exportedFix

What does the error look like?

  • Manifest merger failed : Apps targeting Android 12 and higher are required to specify an explicit value for android:exported when the corresponding component has an intent filter defined.
  • When using intent filters, please specify android:exported as well
  • INSTALL_FAILED_VERIFICATION_FAILURE (older Android Studio versions)

Cause 1 of 2

Your own activity, service or receiver has an intent filter but no android:exported

1Check

Open your manifest and look at every component that has an intent-filter child. Any of them without android:exported triggers the error.

grep -n -B3 "intent-filter" app/src/main/AndroidManifest.xml

2Fix

Add android:exported. Android's guidance is true for a component with the LAUNCHER category, and false in most other cases.

<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>
<service android:name=".SyncService" android:exported="false">
    <intent-filter>
        <action android:name="com.example.app.START_SYNC" />
    </intent-filter>
</service>

3Verify

Build again; the merger error should be gone.

./gradlew :app:assembleDebug

Confirmed by developer.android.com

Did this fix it?

Cause 2 of 2

A library's manifest declares a component without android:exported

1Check

Open the Merged Manifest tab, click the element and read the Merging Log, or look in the report in build/outputs/logs.

grep -n "manifest-merger\|exported" app/build/outputs/logs/manifest-merger-debug-report.txt

2Fix

Update the library first. If no fixed version exists, redeclare the component in your own manifest with android:exported and tools:node="merge", which merges your attribute with the library's other attributes.

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools">
    <application>
        <activity android:name="com.vendor.lib.SomeActivity"
            android:exported="false"
            tools:node="merge" />
    </application>
</manifest>

3Verify

Rebuild and check the Merged Manifest tab shows android:exported on the component.

./gradlew :app:assembleDebug

Confirmed by developer.android.com

Did this fix it?

How do I stop it coming back?

  • Set android:exported on every component the day you add an intent filter.
  • Keep libraries up to date; many publish the fix as a patch release.
  • Watch the lint warning 'When using intent filters, please specify android:exported as well' in the manifest editor.

Sources

How was this page made?

I drafted this page with AI assistance from the official documents listed under Sources. Every cause above names the document that confirms it. 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.

Which stack is behind this page?

Projects of mine built on the same technologies:

Related fixes

Mobile apps

Android Studio cannot pair the phone over Wi-Fi

The Pair devices over Wi-Fi dialog lists no device

Wireless pairing needs the phone on Android 11 or higher and on the same Wi-Fi network as the computer, with current Platform-Tools.

4 causes, each with a fix

Mobile apps

adb tcpip 5555 fails because no device is found

adb: more than one device/emulator

adb tcpip only works while the device is attached and listed by adb, because it tells the phone to start listening on port 5555.

4 causes, each with a fix

Next step

Want this handled for good?

I look after servers, apps and releases end to end. Tell me what keeps breaking.