1

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 That is the error i am facing now for android build. working fine for iOS

11
  • What is your react-native version ? Commented May 7, 2019 at 7:01
  • "react-native": "0.56.0" Commented May 7, 2019 at 7:02
  • If you go through the documentation then you should integrate react-native-firebase instead of react-native-fcm Commented 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." Commented May 7, 2019 at 8:28
  • Did you change google play services version.? Commented May 7, 2019 at 8:33

1 Answer 1

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.

Sign up to request clarification or add additional context in comments.

1 Comment

What is the version of React-native-fcm you are using ?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.