Skip to content

Messaging - Expo EAS build failed (Android) #8165

@whidrubeld

Description

@whidrubeld

Issue

Expo-managed Android project build error using EAS.
The error is due to a conflict with the expo-notifications library when setting a manifest parameter.

> Task :app:processDebugMainManifest FAILED
See https://developer.android.com/r/studio-ui/build/manifest-merger for more information about the manifest merger.
/home/expo/workingdir/build/android/app/src/debug/AndroidManifest.xml:17:88-137 Error:
	Attribute meta-data#com.google.firebase.messaging.default_notification_color@resource value=(@color/notification_icon_color) from AndroidManifest.xml:17:88-137
	is also present at [:react-native-firebase_messaging] AndroidManifest.xml:40:13-44 value=(@color/white).
	Suggestion: add 'tools:replace="android:resource"' to <meta-data> element at AndroidManifest.xml to override.
> Task :react-native-firebase_crashlytics:compileDebugJavaWithJavac
Note: /home/expo/workingdir/build/node_modules/@react-native-firebase/crashlytics/android/src/main/java/io/invertase/firebase/crashlytics/ReactNativeFirebaseCrashlyticsModule.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
> Task :react-native-firebase_analytics:compileDebugJavaWithJavac
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:processDebugMainManifest'.
>
Manifest merger failed : Attribute meta-data#com.google.firebase.messaging.default_notification_color@resource value=(@color/notification_icon_color) from AndroidManifest.xml:17:88-137
  	is also present at [:react-native-firebase_messaging] AndroidManifest.xml:40:13-44 value=(@color/white).
  	Suggestion: add 'tools:replace="android:resource"' to <meta-data> element at AndroidManifest.xml to override.
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org/.

Old problem #7841


Project Files

Javascript

Click To Expand

package.json:

{
   ...
  "dependencies": {
    ...
    "@react-native-firebase/analytics": "^21.0.0",
    "@react-native-firebase/app": "^21.0.0",
    "@react-native-firebase/crashlytics": "^21.0.0",
    "@react-native-firebase/in-app-messaging": "^21.0.0",
    "@react-native-firebase/installations": "^21.0.0",
    "@react-native-firebase/messaging": "^21.0.0",
    ...
    "expo": "~52.0.7",
    ...
    "expo-notifications": "~0.29.8",
    ...
    "react-native": "0.76.3",
    ...
  },
  ...
}

firebase.json for react-native-firebase v6:

{
  "react-native": {}
}

Environment

Click To Expand

react-native info output:

System:
  OS: macOS 15.0.1
  CPU: (11) arm64 Apple M3 Pro
  Memory: 87.75 MB / 18.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 20.9.0
    path: ~/.nvm/versions/node/v20.9.0/bin/node
  Yarn:
    version: 1.22.22
    path: ~/.nvm/versions/node/v20.9.0/bin/yarn
  npm:
    version: 10.1.0
    path: ~/.nvm/versions/node/v20.9.0/bin/npm
  Watchman:
    version: 2022.07.04.00
    path: /opt/homebrew/bin/watchman
Managers:
  CocoaPods:
    version: 1.11.3
    path: /opt/homebrew/bin/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 24.1
      - iOS 18.1
      - macOS 15.1
      - tvOS 18.1
      - visionOS 2.1
      - watchOS 11.1
  Android SDK: Not Found
IDEs:
  Android Studio: 2024.2 AI-242.23339.11.2421.12483815
  Xcode:
    version: 16.1/16B40
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 11.0.17
    path: /usr/bin/javac
  Ruby:
    version: 2.6.10
    path: /usr/bin/ruby
npmPackages:
  "@react-native-community/cli":
    installed: 15.1.2
    wanted: ^15.1.2
  react:
    installed: 18.3.1
    wanted: 18.3.1
  react-native:
    installed: 0.76.3
    wanted: 0.76.3
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: Not found
  newArchEnabled: Not found
iOS:
  hermesEnabled: Not found
  newArchEnabled: Not found
  • Platform that you're experiencing the issue on:
    • iOS
    • Android
    • iOS but have not tested behavior on Android
    • Android but have not tested behavior on iOS
    • Both
  • react-native-firebase version you're using that has this issue:
    • @react-native-firebase/app": "^21.0.0"
  • Firebase module(s) you're using that has the issue:
    • "@react-native-firebase/messaging": "^21.0.0"
  • Are you using TypeScript?
    • "typescript": "~5.3.3"


Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions