You attempted to use a firebase module that's not installed on your Android project by calling

Hi, Am working on React native firebase integration with expo bare flow. I followed react native firebase Document , while running the App am getting error like

Error: You attempted to use a firebase module that’s not installed on your Android project by calling
Ensure you have:
1) imported the ‘’ module in your ‘’ file.
2) Added the ‘new ReactNativeFirebaseAppPackage()’ line inside of the RN ‘getPackages()’ method list.

But I added ReactNativeFirebaseAppPackage in, The file is given below

import android.content.Context;
import com.facebook.react.BuildConfig;
import com.facebook.react.PackageList;
import com.facebook.react.ReactApplication;
import com.facebook.react.ReactInstanceManager;
import com.facebook.react.ReactNativeHost;
import com.facebook.react.ReactPackage;
import com.facebook.react.bridge.JSIModulePackage;
import com.facebook.soloader.SoLoader;
import com.reactlibrary.ApplozicChatPackage;
import com.swmansion.reanimated.ReanimatedJSIModulePackage;
import org.unimodules.adapters.react.ModuleRegistryAdapter;
import org.unimodules.adapters.react.ReactModuleRegistryProvider;
import java.lang.reflect.InvocationTargetException;
import java.util.List;
import javax.annotation.Nullable;
import expo.modules.updates.UpdatesController;

public class MainApplication extends Application implements ReactApplication {
  private final ReactModuleRegistryProvider mModuleRegistryProvider = new ReactModuleRegistryProvider(
    new BasePackageList().getPackageList()

  private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) {
    public boolean getUseDeveloperSupport() {
      return BuildConfig.DEBUG; 

    protected List<ReactPackage> getPackages() {
      List<ReactPackage> packages = new PackageList(this).getPackages();//<------error shows here in android studio
      packages.add(new ModuleRegistryAdapter(mModuleRegistryProvider));
      packages.add(new ReactNativeFirebaseAppPackage());
      packages.add(new ApplozicChatPackage());
      return packages;

    protected String getJSMainModuleName() {
      return "index";

    protected JSIModulePackage getJSIModulePackage() {
      return new ReanimatedJSIModulePackage();

    protected @Nullable String getJSBundleFile() {
      if (BuildConfig.DEBUG) {
        return super.getJSBundleFile();
      } else {
        return UpdatesController.getInstance().getLaunchAssetFile();

    protected @Nullable String getBundleAssetName() {
      if (BuildConfig.DEBUG) {
        return super.getBundleAssetName();
      } else {
        return UpdatesController.getInstance().getBundleAssetName();

  public ReactNativeHost getReactNativeHost() {
    return mReactNativeHost;

  public void onCreate() {
    SoLoader.init(this, /* native exopackage */ false);

    if (!BuildConfig.DEBUG) {

    initializeFlipper(this, getReactNativeHost().getReactInstanceManager());

   * Loads Flipper in React Native templates. Call this in the onCreate method with something like
   * initializeFlipper(this, getReactNativeHost().getReactInstanceManager());
   * @param context
   * @param reactInstanceManager
  private static void initializeFlipper(
      Context context, ReactInstanceManager reactInstanceManager) {
    if (BuildConfig.DEBUG) {
      try {
         We use reflection here to pick up the class that initializes Flipper,
        since Flipper library is not available in release mode
        Class<?> aClass = Class.forName("yyyyyyyyyyyy");
            .getMethod("initializeFlipper", Context.class, ReactInstanceManager.class)
            .invoke(null, context, reactInstanceManager);
      } catch (ClassNotFoundException e) {
      } catch (NoSuchMethodException e) {
      } catch (IllegalAccessException e) {
      } catch (InvocationTargetException e) {

while running the app with the ios simulator it returns a

Native module cannot be null

Environment setup

“react”: “16.13.1”,
“react-dom”: “16.13.1”,
“react-native”: “~0.63.4”,
@react-native-firebase/app”: “^13.0.1”,
Expo SDK 42

please guide us to fix this issue

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.