/Users/jitendra/Desktop/hostmakerco/ops-mobile/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/jitendra/Desktop/hostmakerco/ops-mobile/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
^
Note: /Users/jitendra/Desktop/hostmakerco/ops-mobile/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.
2 errors
:react-native-fcm:compileReleaseJavaWithJavac FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':react-native-fcm:compileReleaseJavaWithJavac'.
> Compilation failed; see the compiler error output for details.
U should use the correct version of this package with the correct version of react native
Check README for this
U should also clear the build on android studio after this
My React Native version is
react-native-cli: 1.0.0
react-native: 0.31.0
and for react native fcm.
"react-native-fcm": "^1.1.1"
Is this not a correct versions?
The above issue is fixed by chaning react-native-fcm version to 1.1.0. But getting following error
Unknown source file : UNEXPECTED TOP-LEVEL EXCEPTION:
Unknown source file : com.android.dex.DexException: Multiple dex files define Lcom/google/android/gms/internal/zzqf;
Unknown source file : at com.android.dx.merge.DexMerger.readSortableTypes(DexMerger.java:596)
Unknown source file : at com.android.dx.merge.DexMerger.getSortedTypes(DexMerger.java:554)
Unknown source file : at com.android.dx.merge.DexMerger.mergeClassDefs(DexMerger.java:535)
Unknown source file : at com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:171)
Unknown source file : at com.android.dx.merge.DexMerger.merge(DexMerger.java:189)
Unknown source file : at com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:502)
Unknown source file : at com.android.dx.command.dexer.Main.runMonoDex(Main.java:334)
Unknown source file : at com.android.dx.command.dexer.Main.run(Main.java:277)
Unknown source file : at com.android.dx.command.dexer.Main.main(Main.java:245)
Unknown source file : at com.android.dx.command.Main.main(Main.java:106)
:app:dexDebug FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:dexDebug'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/Library/Java/JavaVirtualMachines/jdk1.8.0_91.jdk/Contents/Home/bin/java'' finished with non-zero exit value 2
Yeah, the README is also not clear on Android (and cocopods installation fails for me too). Take a look at the MainActivity instructions. RN 30 then 28 and <=27. It's not clear at all. That being said, I'm getting the first error mentioned on RN33 with 2.1.1, which I thought was the right pair.
@jitenderchand1
com.android.dex.DexException: Multiple dex files define Lcom/google/android/gms/internal/zzqf;
is because you are using another react native modules that requires google service lower than 9. e.g react-native-map? search for 8. in gradles
+1
react-native: 0.33.0
and for react native fcm.
"react-native-fcm": "1.1.0"
.../node_modules/react-native-fcm/android/src/main/java/com/evollu/react/fcm/FIRMessagingModule.java:161: error: method does not override or implement a method from a supertype
@Override
^
Note: ...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.
1 error
:react-native-fcm:compileReleaseJavaWithJavac FAILED
Rn33 should use RN-FCM >= 2
It's working on iOS - I had to update FCM on cocoapod form 3.3.0 to 3.6.0 but still it's not working on Android.
"react-native-fcm": "2.2.0",
"react-native": "0.33.0",
:react-native-fcm:compileReleaseJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.).
.../node_modules/react-native-fcm/android/src/main/java/com/evollu/react/fcm/FIRMessagingModule.java:34: 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:200: 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:204: error: method does not override or implement a method from a supertype
@Override
^
Note: .../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
try to clear the android studio cache
I deleted gradle cache and cleaned the android project but it did not help.
(https://cloud.githubusercontent.com/assets/17026236/18903802/50928506-855b-11e6-8ff5-384196155435.png)
I'm in react-native fcm folder, as you can see from the print screen (using android studio) and still getting react-native 0.20.1 as a build. Anyone have an idea how to rid of it? I did upgrade my RN to 0.34 so it should work like a charm. Thanks.
Delete node_modules and install again,
Run react-native upgrade if u have upgrade ur RN version
@HexNeck I remember someone had this issue too. Check all your 3rd party and see if any library declare to use something like RN 0.20+
I started the app from the beginning and with some work the app can build itself. @sibelius @evollu thanks for the tips.
Most helpful comment
Yeah, the
READMEis also not clear on Android (and cocopods installation fails for me too). Take a look at theMainActivityinstructions. RN 30 then 28 and <=27. It's not clear at all. That being said, I'm getting the first error mentioned on RN33 with 2.1.1, which I thought was the right pair.