Build Error: Ad Services config

It’s been some time I can not build the apps as I get the below error:

  • 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.1] 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 element at AndroidManifest.xml to override.

I had checked the forum and have noticed that there were problems with the previous version and the devs were waiting for the next version. The last version 3709 is out but I still get the same error. I use Appodeal which might conflict with Google plugin versions.

Hi there,
It seems what we are getting is “This is a known issue of the AdMob and Google Services libraries”, there is a also a stackoverflow entry.

The suggestion is modifying AndroidManifest.xml with replace property.

However I do not know how can we do this in Solar2D, perhaps there is a way to implement this in build.settings but I do not know.

Hope someone can help us!.

I googled and found how to modify the AndroidManifest.xml but it gave the same error so I gave up.

@Scott_Harrison was working on Appodeal plugin and I thought him updating Appodeal would solve the error but I still have the same error.

I am using ApplovinMax and getting the same error.

Adding this to applicationChildElements in build settings seems to be working for me;

            [[
                <property  android:name="android.adservices.AD_SERVICES_CONFIG" android:resource="@xml/gma_ad_services_config" tools:replace="android:resource" />
            ]],

Awesome! It worked, thanks! What I had tried was a different way, which, turns out to be a wrong one.

I also had to add a corona.gradle file to the AndroidResources/ folder to exclude the armeabi ABI from being included. Messy.

android{
    defaultConfig{
        ndk{
            abiFilters "arm64-v8a", "armeabi-v7a", "x86", "x86_64"
        }
    }
}