when building my Flutter app for Android I receive the following error:
Attribute property#android.adservices.AD_SERVICES_CONFIG@resource value=(@xml/ga_ad_services_config) from [com.google.android.gms:play-services-measurement-api:22.0.2] AndroidManifest.xml:32:13-58
is also present at [com.google.android.gms:play-services-ads-lite:23.0.0] AndroidManifest.xml:92:13-59 value=(@xml/gma_ad_services_config).
Suggestion: add 'tools:replace="android:resource"' to <property> element at AndroidManifest.xml to override.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:processReleaseMainManifest'.
> Manifest merger failed : Attribute property#android.adservices.AD_SERVICES_CONFIG@resource value=(@xml/ga_ad_services_config) from [com.google.android.gms:play-services-measurement-api:22.0.2] AndroidManifest.xml:32:13-58
is also present at [com.google.android.gms:play-services-ads-lite:23.0.0] AndroidManifest.xml:92:13-59 value=(@xml/gma_ad_services_config).
Suggestion: add 'tools:replace="android:resource"' to <property> element at AndroidManifest.xml to override.
I tried following the instructions in this post, but sadly this leads to a “Parsing Error” of my AndroidManifest.xml which I don’t know how to solve either..
Additional details:
My AGP Version: 8.5
google_mobile_ads: ^5.1.0
// inside android/app/build.gradle:
dependencies {
implementation 'com.google.android.gms:play-services-ads:23.0.0'
}
Any idea how to solve this error?
Thank you!