Open konzertimpo opened 6 years ago
I'm not sure.
you can remove import from "react-native-fcm";
This kind of error shows us mostly because not integrated correctly. for example, missing the change in MainActivity.java
import from "react-native-fcm"
was a copy&past mistake and is not in the code ;)
The MainActivity.java looks like this:
package com.mytestapp;
import com.facebook.react.ReactActivity;
import android.content.Intent;
public class MainActivity extends ReactActivity {
/**
* Returns the name of the main component registered from JavaScript.
* This is used to schedule rendering of the component.
*/
@Override
protected String getMainComponentName() {
return "MyTestApp";
}
@Override
public void onNewIntent(Intent intent) {
super.onNewIntent(intent);
setIntent(intent);
}
}
As I mentioned before, everything works fine with react-native run-android
. But if I try to start it with npm start
and expo, the error occurs.
I have a problem starting the app in expo (Android & iOS).
Every time i try to to call a Method from FCM, i get an error like the following:
Here is the code I use:
When I compile to APK everything is working fine. What am I doing wrong? Is the package not compatible with expo?
I know similar problems where already discussed for Android and iOS builds. But i found nothing related to expo...