Understand Firebase for Android

As you're developing your Android project using Firebase, you might discover concepts that are unfamiliar or specific to Firebase. This page aims to answer those questions or point you to resources to learn more.

If you have questions about a topic not covered on this page, feel free to visit one of our online communities. We'll also update this page with new topics periodically, so check back to see if we've added the topic you want to learn about!

Firebase Assistant plugin for Android Studio

The Firebase Assistant is an Android Studio plugin that registers your Android app with a Firebase project and adds the necessary Firebase config files, plugins, and dependencies to your Android project — all from within Android Studio!

Follow the instructions in the Android getting started page to use the Firebase Assistant. Make sure that you're using the most up-to-date versions of both Android Studio and the Firebase Assistant (go to File > Check for updates).

When you select specific Firebase products to add to your app, the Firebase Assistant automatically declares the required dependencies in your app/build.gradle file. Note that if you want to use the Firebase Android BoM (recommended), update the dependencies in your module (app-level) Gradle file (usually app/build.gradle) to import the BoM platform. You'll also need to remove the versions from each Firebase library dependency line.

Additionally, to use some Firebase products, you must enable APIs or provision resources outside of Android Studio. The instructions for each product in the Firebase Assistant describe any additional actions that you need to do. For example, to use Cloud Firestore, you need to set up your database and rules in the Firebase console.

Google services — plugin and config file

As part of adding Firebase to your Android project, you need to add the google-services plugin and a google-services.json configuration file to your project.

If you add Firebase to your Android project via the Firebase console, the Management REST API, or the Firebase CLI, you must manually add the plugin and config file to your project. However, if you use the Firebase Assistant, these tasks are automatically done for you during setup.

Visit the Android documentation to learn about how the Google services plugin and config file work together.

Firebase Android BoM (Bill of Materials)

The Firebase Android BoM (Bill of Materials) lets you manage all your Firebase library versions by specifying only one version — the BoM's version.

When you use the Firebase BoM in your app, the BoM automatically pulls in the individual library versions mapped to BoM's version. All the individual library versions will be compatible. When you update the BoM's version in your app, all the Firebase libraries that you use in your app will update to the versions mapped to that BoM version.

To learn which Firebase library versions are mapped to a specific BoM version, check out the release notes for that BoM version. If you need to compare the library versions mapped to one BoM version compared to another BoM version, use the comparison widget below.

Learn more about Gradle's support for BoM platforms.

Here's how to use the Firebase Android BoM to declare dependencies in your module (app-level) Gradle file (usually app/build.gradle). When using the BoM, you don't specify individual library versions in the dependency lines.

dependencies {
  // Import the BoM for the Firebase platform
  implementation platform('com.google.firebase:firebase-bom:34.14.1')

  // Declare the dependencies for the desired Firebase products without specifying versions
  // For example, declare the dependencies for Firebase Authentication and Cloud Firestore
  implementation 'com.google.firebase:firebase-auth'
  implementation 'com.google.firebase:firebase-firestore'
}

Here are some frequently asked questions about using the Firebase Android BoM:

How do I use a different library version than what's designated in the BoM?

Here's how to override a library version designated in the BoM:

  1. Maintain the line to import the BoM platform.

  2. In the library's dependency line, specify the desired library version. For example, here's how to declare dependencies if you want to use v18.0.0 of App Indexing no matter what version is designated in the BoM, but you want to use the BoM's versions for Authentication and Cloud Firestore:

    dependencies {
      // Import the BoM for the Firebase platform
      implementation platform('com.google.firebase:firebase-bom:34.14.1')
    
      // Declare the dependency for the App Indexing library and specify a version
      // This specified library version overrides the version designated in the BoM.
      implementation 'com.google.firebase:firebase-appindexing:18.0.0'
    
      // Declare the dependencies for the other Firebase libraries without specifying versions
      // These libraries will use the versions designated in the BoM.
      implementation 'com.google.firebase:firebase-auth'
      implementation 'com.google.firebase:firebase-firestore'
    }

Does the BoM automatically add all the Firebase libraries to my app?

No. To actually add and use Firebase libraries in your app, you must declare each library as a separate dependency line in your module (app-level) Gradle file (usually app/build.gradle).

Using the BoM ensures that the versions of any Firebase libraries in your app are compatible, but the BoM doesn't actually add those Firebase libraries to your app.

Are the Firebase Kotlin extensions (KTX) libraries supported by the BoM?

In July 2025 (BoM v34.0.0), the Firebase Kotlin extensions (KTX) libraries were removed from the BoM. If you use a BoM version earlier than v34.0.0, then you can continue using KTX libraries in your app.

However, we recommend that you migrate your app to use KTX APIs from the main modules; otherwise, you won't be able to update to newer BoM versions and thus newer versions of the Firebase product libraries. For details, see the FAQ about this initiative.

Can I use the BoM to add Android libraries that are not from Firebase?

No. The Firebase Android BoM only manages library versions for Firebase libraries.

Why is the BoM the recommended way to manage Firebase library versions?

Even though each Firebase library is versioned independently, they are built together to ensure that the latest release of each library is compatible with the others.

By using the BoM to manage your app's Firebase library versions, you don't need to track which version of a Firebase library is compatible with another Firebase library.

Even if you only use one Firebase library in your app right now, we still recommend using the BoM because you never know when you might want to use another Firebase library!

My app uses a Gradle version earlier than 5.0 — can I still use the BoM?

Yes, you can still use the BoM! For Gradle 5.0 and later, BoM support is automatically enabled. However, for earlier versions of Gradle, you just need to enable the BoM feature and import the BoM a bit differently.

  1. To your settings.gradle file, add enableFeaturePreview('IMPROVED_POM_SUPPORT').

  2. To your module (app-level) Gradle file (usually app/build.gradle), import the BoM like a normal library (without the platform modifier), like so:

    dependencies {
      // Import the Firebase BoM
      implementation 'com.google.firebase:firebase-bom:34.14.1'
    
      // Declare the dependencies for the desired Firebase products, without specifying versions
      // For example, declare the dependencies for Firebase Authentication and Cloud Firestore
      implementation 'com.google.firebase:firebase-auth'
      implementation 'com.google.firebase:firebase-firestore'
    }