I am trying add AdMob ads in my app. when I add AdMob dependency and implement ads after when I run the app I got this error.
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:21.6.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.
When I see Merged Manifest here is also error
Merge Errors Error: Attribute property#android.adservices.AD_SERVICES_CONFIG@resource value=(@xml/ga_ad_services_config) from AndroidManifest.xml:32:13-58 is also present at 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. cryptotradingsignals.app main manifest (this file), line 31
I also Add this in manifest still got error but different error
tools:replace="android:resource"
Any Idea how to solve?
I am looking for a result to solve my error in android latest version Laguana
I added the following code in AndroidManifest.xml. Not sure if this is the final solution, but it works for me now.
<property
android:name="android.adservices.AD_SERVICES_CONFIG"
android:resource="@xml/gma_ad_services_config"
tools:replace="android:resource" />
...
</application>
Going back to 22.3.0 admob dependency solved it for me
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With