Android Material and appcompat Manifest merger failed in react-native or ExpoKit Android Material and appcompat Manifest merger failed in react-native or ExpoKit android android

Android Material and appcompat Manifest merger failed in react-native or ExpoKit


Upgrading 'react-native-device-info' to version 2.1.2 fixed the error for me. See github.com/facebook/react-native/issues/25294#issuecomment-503024749

In short: the library used "services-gcm:+" as a dependency, and the latest gcm version caused this problem.


The root cause is related migration to Androidx, google play service updated to androidXThanks to MR03web This problem belongs to react-native-device-info? best option is to upgrade react-native-device-info using

yarn upgrade react-native-device-info@2.1.2cd android && gradlew cleanreact-native run-android

or if you don't want to upgrade you should exclude com.google.android.gms from react-native-device-info like this. Thanks

implementation(project(":react-native-device-info"),  {  exclude group: "com.google.android.gms"})implementation "com.google.android.gms:play-services-gcm:16.0.0"


Add the following to your gradle.properties then clean/rebuild

googlePlayServicesVersion=16.1.0firebaseVersion=17.6.0