Understand Firebase for Android

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

If you have questions about a topic not covered on this page, feel free to visitone of ouronline communities. We'll alsoupdate this page with new topics periodically, so check back to see if we'veadded the topic you want to learn about!

Firebase Assistant plugin for Android Studio

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

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

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

Additionally, to use some Firebase products, you must enable APIs or provisionresources outside of Android Studio. The instructions for each product in theFirebase Assistant describe any additional actions that you need to do. Forexample, to useCloud Firestore, you need to set up your database and rules in theFirebase console.

Google services — plugin and config file

As part of adding Firebase to your Android project, you need to add thegoogle-services plugin and agoogle-services.json configuration file toyour project.

If you add Firebase to your Android project viatheFirebase console,theManagement REST API,or theFirebase CLI,you must manually add the plugin and config file to your project. However, ifyou use theFirebase Assistant, these tasks areautomatically done for you during setup.

Note: Thegoogle-services.json config file contains unique, but non-secretidentifiers for your project. To learn more about this config file, visitUnderstand Firebase Projects.

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

Firebase Android BoM (Bill of Materials)

TheFirebase Android BoM (Bill of Materials) lets you manage all yourFirebase library versions by specifying only one version — theBoM'sversion.

When you use theFirebase BoM in your app, theBoM automatically pullsin the individual library versions mapped toBoM's version.All theindividual library versions will be compatible. When you update theBoM'sversion in your app, all the Firebase libraries that you use in your app willupdate to the versions mapped to thatBoM version.

To learn which Firebase library versions are mapped to a specificBoMversion, check out therelease notes for thatBoM version. If you need to compare the library versions mapped to oneBoM version compared to anotherBoM version, use thecomparison widget below.

Learn more aboutGradle's support forBoM platforms.

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

dependencies{// Import theBoM for the Firebase platformimplementationplatform('com.google.firebase:firebase-bom:34.9.0')// Declare the dependencies for the desired Firebase products without specifying versions// For example, declare the dependencies forFirebase Authentication andCloud Firestoreimplementation'com.google.firebase:firebase-auth'implementation'com.google.firebase:firebase-firestore'}

Here are some frequently asked questions about using theFirebase Android BoM:

How do I use adifferent library version than what's designated in theBoM?

Important:If you use more than one Firebase library in your app, specifying a different version than what's designated in theBoM is not recommended. The specified version may not be compatible with other Firebase library versions.

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

  1. Maintain the line to import theBoM platform.

  2. In the library's dependency line, specify the desired library version. Forexample, here's how to declare dependencies if you want to use v18.0.0ofApp Indexing no matter what version is designated in theBoM,but you want to use theBoM's versions forAuthentication andCloud Firestore:

    dependencies{// Import theBoM for the Firebase platformimplementationplatform('com.google.firebase:firebase-bom:34.9.0')// Declare the dependency for theApp Indexing library and specify a version// This specified library version overrides the version designated in theBoM.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 theBoM.implementation'com.google.firebase:firebase-auth'implementation'com.google.firebase:firebase-firestore'}

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

No. To actually add and use Firebase libraries in your app, you must declareeach library as a separate dependency line in yourmodule (app-level) Gradlefile (usuallyapp/build.gradle).

Using theBoM ensures that theversions of any Firebase libraries in yourapp are compatible, but theBoM doesn't actuallyadd those Firebaselibraries to your app.

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

In July 2025 (BoM v34.0.0), the Firebase Kotlin extensions (KTX) librarieswere removed from theBoM. If you use aBoM version earlier thanv34.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 mainmodules; otherwise, you won't be able to update to newerBoM versions andthus newer versions of the Firebase product libraries. For details, see theFAQ about this initiative.

Can I use theBoM to add Android libraries that arenot from Firebase?

No. TheFirebase Android BoM only manages library versions for Firebaselibraries.

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

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

By using theBoM to manage your app's Firebase library versions, you don'tneed to track which version of a Firebase library is compatible with anotherFirebase library.

Even if you only use one Firebase library in your app right now, we stillrecommend using theBoM because you never know when you might want to useanother Firebase library!

My app uses a Gradle versionearlier than 5.0 — can I still use theBoM?

Yes, you can still use theBoM! For Gradle 5.0 and later,BoM support isautomatically enabled. However,for earlier versions of Gradle,you just need toenable theBoM feature and import theBoM a bit differently.

  1. To yoursettings.gradle file, addenableFeaturePreview('IMPROVED_POM_SUPPORT').

  2. To yourmodule (app-level) Gradle file (usuallyapp/build.gradle), import theBoM like a normal library (without theplatform modifier), like so:

    dependencies{// Import theFirebase BoMimplementation'com.google.firebase:firebase-bom:34.9.0'// Declare the dependencies for the desired Firebase products, without specifying versions// For example, declare the dependencies forFirebase Authentication andCloud Firestoreimplementation'com.google.firebase:firebase-auth'implementation'com.google.firebase:firebase-firestore'}

How do I report an issue or offer feedback on theBoM?

Visit theFirebase Android SDK repo on GitHub.

CompareFirebase BoM versions

Kotlin extensions (KTX) library modules

InJuly 2025, we stopped releasing new versions of KTX modules for Firebase libraries, and we removed the KTX libraries from theFirebase Android BoM (v34.0.0).

If you use KTX APIs from the previously released KTX modules, we strongly recommend that youmigrate your app to use KTX APIs from the main modules instead. For details, see theFAQ about this initiative.

Feature modules and Play Feature Delivery

As of May 2021 (Firebase BoM v28.0.0), Firebase Android SDKs can beused in dynamic feature modules which are installed separately from your baseapplication module.

To enable support for dynamic feature modules, add the following dependencyto yourbase module'sbuild.gradle file:

dependencies{implementation'com.google.firebase:firebase-dynamic-module-support:16.0.0-beta04'}

Now that you've added dynamic module support, you can add Firebase SDKdependencies (with or without theFirebase BoM) to feature modules of yourapp and use them as you normally would.

For example, if your application usesRealtime Database to power a specific realtimefeature you could add thefirebase-database dependency to thebuild.gradleof the feature module rather than the base module. This will reduce downloadsize for most users.

Be aware of the following caveats when using Firebase SDKs in feature modules:

  • Products such asDynamic Links orFirebase In-App Messaging which rely on theAnalyticsfirst_open event may miss this event when used in a dynamic feature module.

  • When usingCloud Firestore andAuthentication together, you should always include themboth in the same module. If this is not possible, then make sure thatAuthenticationis loadedbeforeCloud Firestore; otherwise, someCloud Firestore operations mayhave an incorrect authentication state.

  • When usingfirebase-crashlytics-ndk as a dependency of a dynamic featuremodule, you need to set theunstrippedNativeLibsDir property in your app'sbuild.gradle file, as described in theCrashlytics NDK documentation.

For more information on feature modules and Play Feature Delivery, visitOverview of Play Feature Delivery.

Google services Gradle plugin vs Google Play services vs Google Play Store

Several pieces of the Google, Firebase, and Android ecosystem have similarnaming conventions. Here's a brief explanation for each:

Google services Gradle plugin
A Gradle plugin (com.google.gms.google-services) that runs at build time toensure that your app has the right configuration to access Firebase and GoogleAPIs
Despite its name, this plugin has no relation to Google Play services (seenext entry) and has no impact on your app's capabilities at runtime.
This plugin also processes thegoogle-services.json file that you add toyour app as part of setting up Firebase. Learn more about theGoogle services Gradle plugin.
Google Play services
An invisible background service that runs on an Android device and providesseveral common Google APIs (like Google Maps and Google Sign In) to apps onthe device
By centralizing these common APIs into a single service, it reduces the sizeof other apps and allows a device to receive automatic security updates andfeature enhancements without an OS update. Learn more aboutGoogle Play services.
Google Play Store
A store to download apps, movies, books, and more on an Android device
As a developer, you manage the distribution, releases, etc. for your app viathe Google Play Console. If a device has the Google Play Store, it's alsorunning Google Play services (see previous entry). Learn more about theGoogle Play Store for developers.
Google Play Games services
A set of APIs for mobile game developers
Learn more aboutGoogle Play Games services and how tointegrate Firebase with your Google Play Games services project.

Open source resources for Firebase Android SDKs

Firebase supports open source development, and we encourage communitycontributions and feedback.

Firebase Android SDKs

Most Firebase Android SDKs are developed as open source libraries in our publicFirebase GitHub repository.We're actively working to move the remaining privately developed Firebaselibraries to our public GitHub soon!

Quickstart samples

Firebase maintains a collection of quickstart samples for most Firebase APIs onAndroid. Find these quickstarts in our publicFirebase GitHub quickstart repository.

You can open each quickstart as an Android Studio project, then run them on amobile device or a virtual device (AVD). Or you can use these quickstarts asexample code for using Firebase SDKs.

Other topics of interest

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2026-02-18 UTC.