Android app keeps closing after import expo-firebase-auth

Hi, I followed the tutorial here:

Added firebase-app (core) successfully. But when I tried to add expo-firebase-auth, the app just kept closing itself.

I found there’s an extra point in the instruction:


And it directed me to:

And I did paste the code but it won’t work. Any idea how I should fix step three?

Thank you very much.


Yeah those docs have changed unfortunately.


  1. Append the following lines to android/settings.gradle:

    include ':expo-firebase-auth'
    project(':expo-firebase-auth').projectDir = new File(rootProject.projectDir, '../node_modules/expo-firebase-auth/android')

    and if not already included

    include ':expo-core'
    project(':expo-core').projectDir = new File(rootProject.projectDir, '../node_modules/expo-core/android')
    include ':expo-firebase-app'
    project(':expo-firebase-app').projectDir = new File(rootProject.projectDir, '../node_modules/expo-firebase-app/android')
  2. Insert the following lines inside the dependencies block in android/app/build.gradle:

    api project(':expo-firebase-auth')

    and if not already included

    api project(':expo-core')
    api project(':expo-firebase-app')
  3. Some Unimodules are not included in the default ExpoKit suite, these modules will needed to be added manually. If your Android build cannot find the Native Modules, you can add them like this: ./android/app/src/main/java/host/exp/exponent/

 * At the top of the file.
 * This is automatically imported with Android Studio, but if you are in any other editor you will need to manually import the module.
import; // This should be here for all Expo Firebase features.
import expo.modules.firebase.auth.FirebaseAuthPackage;

// Later in the file...

public List<Package> expoPackages() {
  // Here you can add your own packages.
  return Arrays.<Package>asList(
    new FirebaseAppPackage(), // This should be here for all Expo Firebase features.
    new FirebaseAuthPackage() // Include this.

Hi, thanks for the reply, but I still get the force closing error on Android if I imported expo-firebase-auth. Here’s my files:

Right now I commented out all firebase-auth imports. As long as I uncomment them, the app force close.

Could you take a look please? Especially the I don’t really know what weng wrong. It’s a fresh new expo init project just with firebase import.

My package.json is clean, and iOS runs fine, so it must be something on the Android side.

  "name": "empty-project-template",
  "main": "node_modules/expo/AppEntry.js",
  "private": true,
  "scripts": {
    "start": "expo start",
    "android": "expo start --android",
    "ios": "expo start --ios",
    "eject": "expo eject"
  "dependencies": {
    "expo": "^30.0.1",
    "expo-firebase-app": "^1.0.0-rc.1",
    "expo-firebase-auth": "^1.0.0-rc.1",
    "expokit": "1.7.1",
    "react": "16.3.1",
    "react-native": ""

Found the crash was caused by this:

java.lang.RuntimeException: Unable to get provider java.lang.IllegalArgumentException: Given String is empty or null

But have no idea why…

See the trouble shooting:

Got it. Solved. Thanks.

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