firebase / firebase-unity-sdk

The Firebase SDK for Unity
http://firebase.google.com
Apache License 2.0
226 stars 37 forks source link

[Bug] Unity 6, AdMob & Firebase SDKs -- duplicated attribute property#android.adservices.AD_SERVICES_CONFIG #1137

Open manelizzard opened 2 hours ago

manelizzard commented 2 hours ago

Description

Impossible to build Android on Unity 6 with AdMob & Firebase SDKs. The resulting error is:

Attribute property#android.adservices.AD_SERVICES_CONFIG@resource value=(@xml/gma_ad_services_config) from [com.google.android.gms:play-services-ads-lite:23.2.0] AndroidManifest.xml:92:13-59
    is also present at [com.google.android.gms:play-services-measurement-api:22.0.2] AndroidManifest.xml:32:13-58 value=(@xml/ga_ad_services_config).
    Suggestion: add 'tools:replace="android:resource"' to <property> element at AndroidManifest.xml to override.

The involved libraries are:

While there is a workaround by using tools:replace on main AndroidManifest.xml, may worth exploring a real compatibility within those two SDKs

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

Some references: here, here and here

Reproducing the issue

Firebase Unity SDK Version

12.4.0

Unity editor version

6000

Installation Method

.unitypackage

Problematic Firebase Component(s)

Analytics

Other Firebase Component(s) in use

No response

Additional SDKs you are using

AdMob

Targeted Platform(s)

Android

Unity editor platform

Mac

Scripting Runtime

IL2CPP

Release Distribution Type

Pre-built SDK from https://firebase.google.com/download/unity

Relevant Log Output

Attribute property#android.adservices.AD_SERVICES_CONFIG@resource value=(@xml/gma_ad_services_config) from [com.google.android.gms:play-services-ads-lite:23.2.0] AndroidManifest.xml:92:13-59
    is also present at [com.google.android.gms:play-services-measurement-api:22.0.2] AndroidManifest.xml:32:13-58 value=(@xml/ga_ad_services_config).
    Suggestion: add 'tools:replace="android:resource"' to <property> element at AndroidManifest.xml to override.

If using CocoaPods for Apple platforms, the project's Podfile.lock

Expand Podfile.lock snippet
```yml đŸ‘€ Replace this line with the contents of your Podfile.lock! ```
google-oss-bot commented 2 hours ago

I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.