I have ejected my react native app to Expokit. I am trying to use react native firebase. After following the setup instructions for react native firebase as given on android installation page, when I execute 'react-native run-android' I get an error:
MainApplication.java:37: error: cannot find symbol
new MainReactPackage(),
^
symbol: class MainReactPackage
location: class MainApplication
The MainApplication.java looks like this:
package com.abc.xyz;
import android.support.multidex.MultiDexApplication;
import com.facebook.react.ReactPackage;
import java.util.Arrays;
import java.util.List;
import io.invertase.firebase.RNFirebasePackage;
import io.invertase.firebase.analytics.RNFirebaseAnalyticsPackage; // Firebase Analytics
import com.facebook.react.ReactApplication;
public class MainApplication extends MultiDexApplication {
public List<ReactPackage> getPackages() {
return Arrays.<ReactPackage>asList(
new MainReactPackage(),
new RNFirebasePackage(),
new RNFirebaseAnalyticsPackage()
);
}
}
Try adding this line to your MainApplication.java
:
import com.facebook.react.shell.MainReactPackage;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With