eas build -p android fails after adding expo-firebase-analytics/expo-firebase-core

Hello,

after installing expo-firebase-analytics@5.0.3 ( also tried 4.1.0) my android eas build started failing.
I also installed only expo-firebase-core and still getting the error, so it might not be directly the analytics.

Building with expo-cli works fine.

Expo SDK 43
eas-cli@0.38.3
expo-cli@4.13.0

[stderr] FAILURE: Build failed with an exception.
[stderr] * What went wrong:
[stderr] Execution failed for task ':app:checkReleaseDuplicateClasses'.
[stderr] > A failure occurred while executing com.android.build.gradle.internal.tasks.CheckDuplicatesRunnable
[stderr]    > Duplicate class com.google.android.gms.internal.firebase_messaging.zza found in modules jetified-firebase-iid-19.0.0-runtime (com.google.firebase:firebase-iid:19.0.0) and jetified-firebase-messaging-22.0.0-runtime (com.google.firebase:firebase-messaging:22.0.0)
[stderr]      Duplicate class com.google.android.gms.internal.firebase_messaging.zzb found in modules jetified-firebase-iid-19.0.0-runtime (com.google.firebase:firebase-iid:19.0.0) and jetified-firebase-messaging-22.0.0-runtime (com.google.firebase:firebase-messaging:22.0.0)
[stderr]      Duplicate class com.google.android.gms.internal.firebase_messaging.zzc found in modules jetified-firebase-iid-19.0.0-runtime (com.google.firebase:firebase-iid:19.0.0) and jetified-firebase-messaging-22.0.0-runtime (com.google.firebase:firebase-messaging:22.0.0)
[stderr]      Duplicate class com.google.android.gms.internal.firebase_messaging.zzd found in modules jetified-firebase-iid-19.0.0-runtime (com.google.firebase:firebase-iid:19.0.0) and jetified-firebase-messaging-22.0.0-runtime (com.google.firebase:firebase-messaging:22.0.0)
[stderr]      Duplicate class com.google.android.gms.internal.firebase_messaging.zze found in modules jetified-firebase-iid-19.0.0-runtime (com.google.firebase:firebase-iid:19.0.0) and jetified-firebase-messaging-22.0.0-runtime (com.google.firebase:firebase-messaging:22.0.0)
[stderr]      Duplicate class com.google.android.gms.internal.firebase_messaging.zzf found in modules jetified-firebase-iid-19.0.0-runtime (com.google.firebase:firebase-iid:19.0.0) and jetified-firebase-messaging-22.0.0-runtime (com.google.firebase:firebase-messaging:22.0.0)
[stderr]      Duplicate class com.google.android.gms.internal.firebase_messaging.zzh found in modules jetified-firebase-iid-19.0.0-runtime (com.google.firebase:firebase-iid:19.0.0) and jetified-firebase-messaging-22.0.0-runtime (com.google.firebase:firebase-messaging:22.0.0)
[stderr]      Duplicate class com.google.android.gms.internal.firebase_messaging.zzm found in modules jetified-firebase-iid-19.0.0-runtime (com.google.firebase:firebase-iid:19.0.0) and jetified-firebase-messaging-22.0.0-runtime (com.google.firebase:firebase-messaging:22.0.0)
[stderr]      Duplicate class com.google.android.gms.internal.firebase_messaging.zzn found in modules jetified-firebase-iid-19.0.0-runtime (com.google.firebase:firebase-iid:19.0.0) and jetified-firebase-messaging-22.0.0-runtime (com.google.firebase:firebase-messaging:22.0.0)
[stderr]      Duplicate class com.google.android.gms.internal.firebase_messaging.zzo found in modules jetified-firebase-iid-19.0.0-runtime (com.google.firebase:firebase-iid:19.0.0) and jetified-firebase-messaging-22.0.0-runtime (com.google.firebase:firebase-messaging:22.0.0)
[stderr]      Duplicate class com.google.android.gms.internal.firebase_messaging.zzp found in modules jetified-firebase-iid-19.0.0-runtime (com.google.firebase:firebase-iid:19.0.0) and jetified-firebase-messaging-22.0.0-runtime (com.google.firebase:firebase-messaging:22.0.0)
[stderr]      Duplicate class com.google.android.gms.internal.firebase_messaging.zzq found in modules jetified-firebase-iid-19.0.0-runtime (com.google.firebase:firebase-iid:19.0.0) and jetified-firebase-messaging-22.0.0-runtime (com.google.firebase:firebase-messaging:22.0.0)
[stderr]      Duplicate class com.google.android.gms.internal.firebase_messaging.zzr found in modules jetified-firebase-iid-19.0.0-runtime (com.google.firebase:firebase-iid:19.0.0) and jetified-firebase-messaging-22.0.0-runtime (com.google.firebase:firebase-messaging:22.0.0)
[stderr]      Duplicate class com.google.firebase.iid.FirebaseInstanceIdReceiver found in modules jetified-firebase-iid-19.0.0-runtime (com.google.firebase:firebase-iid:19.0.0) and jetified-firebase-messaging-22.0.0-runtime (com.google.firebase:firebase-messaging:22.0.0)

please share a minimal reproducible example and post to github.com/expo/expo/issues if you believe you have found a bug :slight_smile:

I was able to reproduce the error on clean project - GitHub - m1st1ck/eas-build-error.
Seems to be a conflict between expo-firebase-analytics, react-native-maps and react-native-onesignal. If I remove one of them the build is successful.

I also opened an issue EAS build -p android error after installing expo-firebase-analytics, react-native-maps and react-native-onesignal · Issue #15455 · expo/expo · GitHub