Manifest & Permissions

Manifest Merger Failed: Find the Conflicting Source Before Overriding

When Android reports “Manifest merger failed,” find the two contributing declarations before applying an override. The merger error is usually telling you that build inputs disagree; adding a broad tools:replace without understanding the conflict can hide the real problem.

By Updated 2 min read

Read the first actionable conflict

Open the build output and the merged-manifest view for the failing variant. Identify the element, attribute, value and source file named in the error. A library manifest, flavor manifest or generated file may be involved.

The manifest-merger documentation explains source priority and merge markers. The final result is not simply the text of your main manifest.

Classify common conflicts

Conflict First action
Different application attribute values Determine which value the release should actually use
Library minimum SDK exceeds the app's Check dependency compatibility rather than blindly overriding
Missing exported declaration Decide whether the component should be externally reachable
Duplicate or incompatible component declarations Trace the contributing dependency or source set
Unresolved placeholder Check variant-specific placeholder configuration

A fix should explain why the chosen value is correct, not merely make the build pass.

Use merge markers narrowly

If an override is justified, apply it to the specific element and attribute. Avoid replacing an entire component when only one attribute conflicts. Review the resulting manifest to ensure permissions, intent filters and metadata were not unintentionally removed.

For a minSdk conflict, overriding a library's minimum can lead to runtime calls unavailable on older devices. Prefer a compatible library version or a deliberate minimum-SDK change with testing.

Rebuild the exact variant

A debug build passing does not prove the release or another flavor is fixed. Run the affected build task and inspect the merged output. Keep the dependency and manifest change together in code review so the reason for the override remains visible.

Use APKLint after resolving the merge

The Manifest Checker can review the final XML for structural and risky configuration issues. It cannot reconstruct every Gradle source priority from a pasted fragment. Use the build's merger report to diagnose the conflict, then APKLint as an additional review of what the app will ship.

Sources and further reading

  1. Android Developers: Merge multiple manifest files
  2. Android Developers: App manifest overview

Reference review: 22 September 2026. Examples illustrate the workflow; check your installed versions, release artifact and account-specific Console requirements before applying them. This guide is not a claim that APKLint executed your project or verified your private account.

APKLint

Android inspection tools and practical release guides. About APKLint · Report a correction