1

I have implemented react-native-firebase in my project. It is working fine. But now I have to get event when the app is opened from the notification tray. According to many blogs and posts I got to know that there is only one solution to get that event through FCM.on(...) function and for that you need to install library react-native-fcm . But when I install and link it, it started throwing error on android/app/gradle.build file compile (project(':react-native-fcm')). The error I am facing is

Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'. java.lang.RuntimeException: java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex

Syed Hassan
  • 438
  • 4
  • 19

1 Answers1

1

Don't use react-native-fcm, react-native-firebase has all the functionality from react-native-fcm built in now. It's all explained quite well in the links below and is quite a bit easier to setup.

rn-firebase cloud messaging

rn-firebase notifications

rt_
  • 1,105
  • 2
  • 15
  • 25