Recently I installed react-native-crisp-chat-sdk in my react native project. It worked fine with IOS but it is failing with error in Android. Here's the build error for android :
Task :app:processDebugMainManifest FAILED
See https://developer.android.com/r/studio-ui/build/manifest-merger for more information about the manifest merger.
Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
See https://docs.gradle.org/8.0.1/userguide/command_line_interface.html#sec:command_line_warnings 112 actionable tasks: 2 executed, 110 up-to-date
info 💡 Tip: Make sure that you have set up your development environment correctly, by running react-native doctor. To read more about doctor command visit: https://github.com/react-native-community/cli/blob/main/packages/cli-doctor/README.md#doctor
/Users/habib/dev/RN/ItemCoder/Yeamazing_app_+files/yeamazing/android/app/src/debug/AndroidManifest.xml:43:9-51 Error: Attribute meta-data#com.google.firebase.messaging.default_notification_icon@resource value=(@drawable/ic_small_icon) from AndroidManifest.xml:43:9-51 is also present at [im.crisp:crisp-sdk:2.0.9] AndroidManifest.xml:77:13-69 value=(@drawable/crisp_sdk_notification_icon). Suggestion: add 'tools:replace="android:resource"' to element at AndroidManifest.xml:41:7-43:54 to override. /Users/habib/dev/RN/ItemCoder/Yeamazing_app+files/yeamazing/android/app/src/debug/AndroidManifest.xml:40:13-44 Error: Attribute meta-data#com.google.firebase.messaging.default_notification_color@resource value=(@color/white) from [:react-native-firebase_messaging] AndroidManifest.xml:40:13-44 is also present at [im.crisp:crisp-sdk:2.0.9] AndroidManifest.xml:80:13-67 value=(@color/crisp_sdk_theme_blue_regular). Suggestion: add 'tools:replace="android:resource"' to element at AndroidManifest.xml:38:9-40:47 to override. /Users/habib/dev/RN/ItemCoder/Yeamazing_app+_files/yeamazing/android/app/src/debug/AndroidManifest.xml:34:13-33 Error: Attribute meta-data#firebase_messaging_auto_init_enabled@value value=(true) from [:react-native-firebase_messaging] AndroidManifest.xml:34:13-33 is also present at [im.crisp:crisp-sdk:2.0.9] AndroidManifest.xml:83:13-34 value=(false). Suggestion: add 'tools:replace="android:value"' to element at AndroidManifest.xml:32:9-34:36 to override.
FAILURE: Build failed with an exception.What went wrong: Execution failed for task ':app:processDebugMainManifest'.Manifest merger failed with multiple errors, see logs
I tried the recommended fix shown with the error but it did not work. I'm really struggling here. Here's my package.json file:
{
"name": "appslug",
"version": "1.0.0",
"private": true,
"scripts": {
"android": "react-native run-android",
"ios": "react-native run-ios",
"lint": "eslint .",
"start": "react-native start",
"test": "jest"
},
"dependencies": {
"@flyerhq/react-native-chat-ui": "^1.4.3",
"@notifee/react-native": "^7.8.2",
"@react-native-async-storage/async-storage": "^1.19.6",
"@react-native-clipboard/clipboard": "^1.14.0",
"@react-native-community/push-notification-ios": "^1.11.0",
"@react-native-firebase/app": "^20.3.0",
"@react-native-firebase/messaging": "^20.3.0",
"@react-native-masked-view/masked-view": "^0.3.1",
"@react-navigation/bottom-tabs": "^6.5.9",
"@react-navigation/native": "^6.1.7",
"@react-navigation/native-stack": "^6.9.13",
"@rneui/base": "^4.0.0-rc.8",
"@rneui/themed": "^4.0.0-rc.8",
"apisauce": "^3.0.1",
"formik": "^2.4.3",
"moment": "^2.30.1",
"moment-timezone": "^0.5.45",
"react": "18.2.0",
"react-native": "0.72.4",
"react-native-crisp-chat-sdk": "^0.16.0",
"react-native-gesture-handler": "^2.16.1",
"react-native-image-picker": "^7.1.2",
"react-native-keyboard-aware-scroll-view": "^0.9.5",
"react-native-linear-gradient": "^2.8.3",
"react-native-permissions": "^4.1.5",
"react-native-push-notification": "^8.1.1",
"react-native-reanimated": "^3.15.0",
"react-native-render-html": "^6.3.4",
"react-native-safe-area-context": "^4.7.2",
"react-native-screens": "^3.25.0",
"react-native-skeleton-placeholder": "^5.2.4",
"react-native-splash-screen": "^3.3.0",
"react-native-svg": "^14.1.0",
"react-native-toast-message": "^2.2.1",
"react-native-vector-icons": "^10.0.0",
"react-native-webview": "^13.8.1",
"socket.io-client": "^4.8.1",
"yup": "^1.2.0"
},
"devDependencies": {
"@babel/core": "^7.20.0",
"@babel/preset-env": "^7.20.0",
"@babel/runtime": "^7.20.0",
"@react-native/eslint-config": "^0.72.2",
"@react-native/metro-config": "^0.72.11",
"@tsconfig/react-native": "^3.0.0",
"@types/react": "^18.0.24",
"@types/react-test-renderer": "^18.0.0",
"babel-jest": "^29.2.1",
"eslint": "^8.19.0",
"jest": "^29.2.1",
"metro-react-native-babel-preset": "0.76.8",
"prettier": "^2.4.1",
"react-test-renderer": "18.2.0",
"typescript": "4.8.4"
},
"engines": {
"node": ">=16"
}
}
How can i solve it?
Source: View source