Skip to content
Latchkey

Android "Manifest merger failed" in CI

The manifest merger combines your app manifest with library manifests and found a conflict it cannot resolve automatically.

What this error means

The build fails with Manifest merger failed : Attribute X value=(...) ... is also present at ..., naming the conflicting attribute and the libraries involved.

gradle
Manifest merger failed : Attribute application@appComponentFactory value=(androidx.core.app.CoreComponentFactory)
from [androidx.core:core:1.12.0] is also present at [com.android.support:support-compat:28.0.0]

Common causes

Conflicting attribute across manifests

Two libraries or your app and a library declare the same attribute with different values.

Mixing incompatible support/AndroidX libraries

Legacy support libraries clashing with AndroidX produce merger conflicts.

How to fix it

Resolve the conflict with tools rules

  1. Read the merger output for the exact attribute and sources.
  2. Add a tools:replace or tools:remove, or align the libraries.
AndroidManifest.xml
<application
    android:appComponentFactory="androidx.core.app.CoreComponentFactory"
    tools:replace="android:appComponentFactory">

Migrate fully to AndroidX

Remove legacy support libraries so manifests do not conflict in the first place.

How to prevent it

  • Keep dependencies on a single, consistent library generation and review merger output when adding libraries. Run the build locally before pushing.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →