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

Using:

react-native: 0.39.0
react-native-fcm: 2.5.2

Building for Android (have not tested iOS):

/.../node_modules/react-native-fcm/android/src/main/java/com/evollu/react/fcm/FIRMessagingModule.java:36: 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 {
       ^
/.../node_modules/react-native-fcm/android/src/main/java/com/evollu/react/fcm/FIRMessagingModule.java:274: error: method does not override or implement a method from a supertype
    @Override
    ^
/.../node_modules/react-native-fcm/android/src/main/java/com/evollu/react/fcm/FIRMessagingModule.java:278: error: method does not override or implement a method from a supertype
    @Override
    ^
3 errors
:react-native-fcm:compileReleaseJavaWithJavac FAILED

FAILURE: Build failed with an exception.

I’ve seen some other similar issues here (all closed) that seem to indicate different solutions, but they did not work in my case.

Note: in code above I replaced my local path with ... for privacy and brevity.

About this issue

  • Original URL
  • State: open
  • Created 8 years ago
  • Comments: 16 (3 by maintainers)

Most upvoted comments

make sure the gradle config is ok

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"
            }
        maven { url 'https://maven.fabric.io/public' }
    }
}

u can only have one url inside each maven