Hi,
I'm getting an error when building the app for Android, using Unity 6000.0.23f1 (LTS).
The error occurs when using Firebase Analytics in combination with LevelPlay with AdMob enabled.
I've used this same combination with previous version of Unity with no issue (2022.3 worked fine). The error only occurs with the latest version 6000, which is not LTS and the recommeded version to use.
The error is:
Attribute property#android.adservices.AD_SERVICES_CONFIG@resource value=(@xml/ga_ad_services_config)
from [com.google.android.gms:play-services-measurement-api:22.1.0] AndroidManifest.xml:32:13-58
is also present at [com.google.android.gms:play-services-ads-lite:23.4.0] AndroidManifest.xml:109:13-59 value=(@xml/gma_ad_services_config).
Suggestion: add 'tools:replace="android:resource"' to element at AndroidManifest.xml to override.
I am using latest versions of LevelPlay/AdMob and Firebase Analytics.
I tried adding
<property
android:name="android.adservices.AD_SERVICES_CONFIG"
android:resource="@xml/gma_ad_services_config"
tools:replace="android:resource" />
to the manifest template, but it didn't work, and anyways doesn't seem to be an elegant solution.
GRADLE ERROR : colliding-attributes
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
> Task :launcher:processReleaseMainManifest FAILED
[com.google.firebase:firebase-analytics-unity:12.2.1]
Warning: Namespace 'com.google.firebase.unity.analytics' is used in multiple modules and/or libraries:
com.google.firebase:firebase-analytics-unity:12.2.1, :firebase-analytics-unity-12.2.1:.
Please ensure that all modules and libraries have a unique namespace.
For more information, See https://developer.android.com/studio/build/configure-app-module#set-namespace
See https://developer.android.com/r/studio-ui/build/manifest-merger for more information about the manifest merger.
Attribute property#android.adservices.AD_SERVICES_CONFIG@resource value=(@xml/ga_ad_services_config)
from [com.google.android.gms:play-services-measurement-api:22.1.0] AndroidManifest.xml:32:13-58
is also present at [com.google.android.gms:play-services-ads-lite:23.4.0] AndroidManifest.xml:109:13-59 value=(@xml/gma_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!
```
Description
Hi, I'm getting an error when building the app for Android, using Unity 6000.0.23f1 (LTS). The error occurs when using Firebase Analytics in combination with LevelPlay with AdMob enabled.
I've used this same combination with previous version of Unity with no issue (2022.3 worked fine). The error only occurs with the latest version 6000, which is not LTS and the recommeded version to use.
The error is: Attribute property#android.adservices.AD_SERVICES_CONFIG@resource value=(@xml/ga_ad_services_config) from [com.google.android.gms:play-services-measurement-api:22.1.0] AndroidManifest.xml:32:13-58 is also present at [com.google.android.gms:play-services-ads-lite:23.4.0] AndroidManifest.xml:109:13-59 value=(@xml/gma_ad_services_config). Suggestion: add 'tools:replace="android:resource"' to element at AndroidManifest.xml to override.
I am using latest versions of LevelPlay/AdMob and Firebase Analytics.
I tried adding <property android:name="android.adservices.AD_SERVICES_CONFIG" android:resource="@xml/gma_ad_services_config" tools:replace="android:resource" />
to the manifest template, but it didn't work, and anyways doesn't seem to be an elegant solution.
Any suggestion?
Reproducing the issue
Firebase Unity SDK Version
12.3.0
Unity editor version
6000.0.23f1
Installation Method
.unitypackage
Problematic Firebase Component(s)
Analytics
Other Firebase Component(s) in use
No response
Additional SDKs you are using
LevelPlay / AdMob
Targeted Platform(s)
Android
Unity editor platform
Windows
Scripting Runtime
IL2CPP
Release Distribution Type
Pre-built SDK from https://firebase.google.com/download/unity
Relevant Log Output
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! ```