react-native-fcm: FIRMessagingModule is not abstract and does not override abstract method

Hi I’ve got the following errors and can’t build the app in android.

/Users/dyea/Juno/node_modules/react-native-fcm/android/src/main/java/com/evollu/react/fcm/FIRMessagingModule.java:30: error: FIRMessagingModule is not abstract and does not override abstract method onActivityResult(int,int,Intent) in ActivityEventListener
public class FIRMessagingModule extends ReactContextBaseJavaModule implements LifecycleEventListener, ActivityEventListener {
       ^
/Users/dyea/Juno/node_modules/react-native-fcm/android/src/main/java/com/evollu/react/fcm/FIRMessagingModule.java:158: error: method does not override or implement a method from a supertype
    @Override
    ^
/Users/dyea/Juno/node_modules/react-native-fcm/android/src/main/java/com/evollu/react/fcm/FIRMessagingModule.java:162: error: method does not override or implement a method from a supertype
    @Override
    ^
Note: /Users/dyea/Juno/node_modules/react-native-fcm/android/src/main/java/com/evollu/react/fcm/FIRMessagingModule.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
3 errors
:react-native-fcm:compileReleaseJavaWithJavac FAILED

react-native: 0.31.0

in android/build.gradle

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:1.3.1'
        classpath 'com.google.gms:google-services:3.0.0'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        mavenLocal()
        jcenter()
        maven {
            // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
            url "$rootDir/../node_modules/react-native/android"
        }
    }
}

Thank you for your support

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Reactions: 1
  • Comments: 23 (8 by maintainers)

Most upvoted comments

Ok, I finally tracked this down. It is an issue with not having the correct gradle version for the react-native version, I think.

If any one has this issue, you have to run react-native upgrade which is a painful process because you have to either diff carefully or afterwards re-add all of your modules because upgrade will overwrite all of that.