Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conflict in AndroidManifest.xml with cordova-plugin-firebase-analytics #225

Open
faytekin opened this issue Oct 28, 2024 · 0 comments
Open

Comments

@faytekin
Copy link

faytekin commented Oct 28, 2024

Hello,

After adding cordova-plugin-firebase-analytics, running cordova build android results in the following error:

> Configure project :app
Adding classpath: com.google.gms:google-services:4.4.0

> Task :app:processDebugMainManifest FAILED
/Users/xxxxy/Documents/repos/appx/platforms/android/app/src/main/AndroidManifest.xml:32:13-58 Error:
        Attribute property#android.adservices.AD_SERVICES_CONFIG@resource value=(@xml/ga_ad_services_config) from [com.google.android.gms:play-services-measurement-api:21.5.0] 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.

See https://developer.android.com/r/studio-ui/build/manifest-merger for more information about the manifest merger.


FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:processDebugMainManifest'.
> 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.5.0] 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.

The issue is due to a conflict in AndroidManifest.xml between android.adservices.AD_SERVICES_CONFIG resources: @xml/ga_ad_services_config from play-services-measurement-api and @xml/gma_ad_services_config from play-services-ads-lite. This causes the manifest merger to fail.

I’ve confirmed that removing cordova-plugin-firebase-analytics resolves the issue. Could you advise on how to handle this resource conflict in the manifest? Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant