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
Active
Viewed 1,810 times
1

Devansh sadhotra
- 1,495
- 1
- 18
- 41
-
What is your react-native version ? – Codesingh May 07 '19 at 07:01
-
"react-native": "0.56.0" – Devansh sadhotra May 07 '19 at 07:02
-
If you go through the documentation then you should integrate react-native-firebase instead of react-native-fcm – Codesingh May 07 '19 at 08: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 May 07 '19 at 08:28
-
Did you change google play services version.? – Codesingh May 07 '19 at 08:33
-
no, I just made a slight change in my component. – Devansh sadhotra May 07 '19 at 08:34
-
What you can do is clear the cache of android studio and restart it. To invalidate cache and restart what you can do is click on file menu and you will find that option i.e invalidate caches/Restart. – Codesingh May 07 '19 at 08:38
-
Still same issue !! didn't work – Devansh sadhotra May 07 '19 at 08:47
-
are google services been used by any other library? – Codesingh May 07 '19 at 09:04
-
Start the app from the scratch. By restarting android studio and opening project by selecting build.gradle file. – Codesingh May 07 '19 at 09:06
-
nothing worked man :/ – Devansh sadhotra May 07 '19 at 12:44
1 Answers
2
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.

Samy
- 116
- 1
- 4