When you start adding third-party libraries, especially older ones, you'll inevitably hit a "Manifest merger failed" error. This usually happens when two libraries try to define the same attribute differently.

The Infamous Conflict

A common culprit is the android:allowBackup or android:theme attribute. If your app says true and a library says false, Gradle will throw a fit.

Build Error Attribute application@allowBackup value=(true) from AndroidManifest.xml:15:9
is also present at [library:some-lib:1.0] AndroidManifest.xml:12:9 value=(false)

Suggestion: add 'tools:replace="android:allowBackup"' to <application>

The Quick Resolution

Follow the suggestion and use the tools:replace attribute in your main manifest. This tells the merger to use your value and ignore the library's conflicting instruction.

Fixed Manifest <application
android:allowBackup="true"
tools:replace="android:allowBackup"
... >

Don't forget to declare the tools namespace at the top of your manifest!

Namespace Declaration xmlns:tools="http://schemas.android.com/tools"

Final Tip

Always check the Merged Manifest tab at the bottom of your AndroidManifest.xml editor. It provides a visual breakdown of where every single line in your final manifest came from. Invaluable for debugging hidden conflicts!