I am facing this issue with android release suddenly. Till Friday everything was working fine, but build is getting failed today with error. i have attached the detailed error in screenshot

Asked
Modified
6 years, 7 months ago
Viewed
2k times
Part
of Mobile Development and Google Cloud Collectives
-
What is your react-native version ?Codesingh– Codesingh2019-05-07 07:01:14 +00:00Commented May 7, 2019 at 7:01
-
"react-native": "0.56.0"Devansh sadhotra– Devansh sadhotra2019-05-07 07:02:59 +00:00Commented May 7, 2019 at 7:02
-
If you go through the documentation then you should integrate react-native-firebase instead of react-native-fcmCodesingh– Codesingh2019-05-07 08:24:31 +00:00Commented May 7, 2019 at 8:24
-
i agree, but till friday , everything was working smoothly. Suddenly this error. Documentation is also saying "react-native-fcm will still take PRs and bug fixes, but possibly no new feature developement any more."Devansh sadhotra– Devansh sadhotra2019-05-07 08:28:40 +00:00Commented May 7, 2019 at 8:28
-
Did you change google play services version.?Codesingh– Codesingh2019-05-07 08:33:53 +00:00Commented May 7, 2019 at 8:33
|
Show 6 more comments
1 Answer
I experienced similar error today, it is due to deprecation of certain firebase classes used by react-native-fcm. You can either rewrite the functions or do the below. Go to build.gradle for react-native-fcm and change it to look like the below code.
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.facebook.react:react-native:+'
compile 'com.google.firebase:firebase-core:16.0.8'
compile 'com.google.firebase:firebase-messaging:17.5.0'
compile 'me.leolin:ShortcutBadger:1.1.17@aar'
}
By default gradle was getting the latest firebase-core and firebase-messaging (specified by +) and this was causing the error. Make sure to clean the project and re-build it.
1 Comment
Devansh sadhotra
What is the version of React-native-fcm you are using ?