Maaz Zindani

Loading the index…

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

Manifest merger fails on the android.adservices.AD_SERVICES_CONFIG property

ErrorManifest merger failed

Short answer

Two manifests declare the same property with different @xml resources and the merger will not choose. Find the library that declares it. If it is an old Google Mobile Ads SDK, upgrade to 24.0.0 or later, where the tag was removed. Otherwise add tools:replace for android:resource to your own property.

  • Applies to Android Gradle plugin 8.x and 9.x, Google Mobile Ads SDK before and after 24.0.0
  • Updated
  • By Maaz Zindani, Senior Software Engineer

Fix it fast

  1. 1Find out which cause you have

    Read the full build error: it names the library manifest that declares the same property. For the whole merge decision, open the manifest merger report of the failing variant.

    ./gradlew :app:processDebugMainManifest
    grep -n "AD_SERVICES_CONFIG" app/build/outputs/logs/manifest-merger-debug-report.txt
  2. 2Match what you see, then jump to its fix

    1. 1The error names com.google.android.gms play-services-ads (or a library that bundles it) as the second source, and your app declares the property as wellAn older Google Mobile Ads SDK still declares the propertyFix
    2. 2The merger error shows two different @xml values for the same property, one from your AndroidManifest.xml and one from a libraryYour manifest and a library set different resources for the same propertyFix

What does the error look like?

  • Manifest merger failed
  • Attribute property#android.adservices.AD_SERVICES_CONFIG

Cause 1 of 2

An older Google Mobile Ads SDK still declares the property

1Check

The Mobile Ads SDK release notes say that version 24.0.0 (2025-02-24) removed the android.adservices.AD_SERVICES_CONFIG property tag from the SDK's manifest to prevent merge conflicts. Check which version the app resolves.

./gradlew :app:dependencies --configuration debugRuntimeClasspath | grep play-services-ads

2Fix

Upgrade to 24.0.0 or later. If another library pulls an older copy in, raise it or add an explicit dependency on the newer version.

// app/build.gradle.kts, or the entry in your version catalog
dependencies {
    implementation("com.google.android.gms:play-services-ads:24.0.0")
}

3Verify

Rebuild. The conflict no longer appears in the manifest merger report.

./gradlew :app:processDebugMainManifest
grep -n "AD_SERVICES_CONFIG" app/build/outputs/logs/manifest-merger-debug-report.txt

Confirmed by developers.google.com

Did this fix it?

Cause 2 of 2

Your manifest and a library set different resources for the same property

1Check

The manifest merger raises a conflict when both manifests set the same attribute to different values. The merged manifest view in Android Studio, or the merger report file, shows which value comes from where.

grep -n -B2 -A2 "AD_SERVICES_CONFIG" app/src/main/AndroidManifest.xml

2Fix

Add a merge rule marker to your own property element. The Android documentation says tools:replace keeps the higher-priority manifest's value for each attribute you list, and your app's manifest has a higher priority than a library's. Declare the tools namespace on the manifest element if it is not there.

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools">
    <application>
        <property
            android:name="android.adservices.AD_SERVICES_CONFIG"
            android:resource="@xml/my_ad_services_config"
            tools:replace="android:resource" />
    </application>
</manifest>

3Verify

Rebuild and look at the merged manifest in the report. The property now carries your resource.

./gradlew :app:processDebugMainManifest
grep -n -A2 "AD_SERVICES_CONFIG" app/build/outputs/logs/manifest-merger-debug-report.txt

Confirmed by developer.android.com

Did this fix it?

How do I stop it coming back?

  • Keep the Google Mobile Ads SDK and Firebase libraries on current releases and read the release notes before an upgrade.
  • Open the Merged Manifest tab after adding any SDK that ships its own manifest entries.
  • Use tools:replace on the single attribute that conflicts, not tools:node="replace" on a whole element, so you do not drop children a library needs.

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

Next step

Want this handled for good?

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