Android “Manifest merger failed”: resolve it with merge markers
Open the Merged Manifest view to find the conflict, then add a tools:replace or tools:remove marker.
Open the Merged Manifest view in AndroidManifest.xml to see the exact conflict. In your app manifest, declare the tools namespace and add tools:replace="android:allowBackup" (or the conflicting attribute) to the element, or tools:node="remove" to drop the library's element.
Try these fixes in order
Find the conflict in Merged Manifest view
Open app/src/main/AndroidManifest.xml and click the Merged Manifest tab. Conflicts are highlighted with both contributing values.
Add a tools:replace marker
Decide the winning value and declare it explicitly in your app manifest with a tools:replace marker on the conflicting attribute.
Or remove the library element
If a library contributes an element you do not want at all, remove it with tools:node="remove" on the matching element in your manifest.
Rebuild and verify the merge
Rebuild and re-open the Merged Manifest view to confirm a single clean merged manifest.
./gradlew :app:processDebugMainManifestInterpret what you see
The log names an attribute like android:label
What it suggests: The build log names the conflicting attribute and the two manifests. The Merged Manifest view shows both values side by side.
Next check: Open AndroidManifest.xml and switch to the Merged Manifest tab at the bottom.
The conflict comes from a dependency's manifest
What it suggests: Libraries commonly declare application-level attributes that collide with the app's own values.
Next check: Decide which value should win and mark it in your app manifest.
Markers you added had no effect
What it suggests: Without the tools namespace declared, merge markers are unrecognized and the error persists.
Next check: Add xmlns:tools="http://schemas.android.com/tools" to your manifest element.
Why this happens
- Your app manifest and a library manifest declare the same attribute with different values.
- A library sets an attribute (such as android:allowBackup or application theme) that conflicts with yours.
Still not working?
Do not edit the library's AAR or its manifest to resolve the conflict; your change is lost on the next dependency update. Declare the merge rule in your own app manifest instead.
Official sources
These steps are based on the linked documentation and general diagnostics. BugMedic has not independently tested every product and system configuration. Review commands before running them.