Firebase Summit is happening now. Tune in to learn how Firebase can help you accelerate app development, gain actionable insights and scale with ease. Join now

Learn more about Android and Firebase

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. However, to use Firebase features that are beyond the current capabilities of the Firebase Assistant, you may want to make some manual changes to these dependencies:

  • If you want to use the Firebase Android BoM, 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.

  • If you want to use a Kotlin extensions library, modify the dependency line added to your module (app-level) Gradle file (usually app/build.gradle) to use the ktx version of the Firebase library instead.

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) enables you to 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('')

  // Declare the dependencies for the desired Firebase products without specifying versions
  // For example, declare the dependencies for Firebase Authentication and Cloud Firestore
  implementation ''
  implementation ''

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

Compare Firebase BoM versions

Kotlin extensions (KTX) libraries

Firebase Kotlin extensions (KTX) libraries are small companions to the base Firebase SDKs that allow you to write beautiful and idiomatic Kotlin code.

To use a KTX library in your app, change your dependency to include the -ktx suffix. Each KTX library automatically has a dependency on the base library, so there's no need to include both dependencies in your app.

dependencies {
  // Import the BoM for the Firebase platform (learn more)
  implementation platform('')

  // Declare the base library
  implementation ''

  // Declare the KTX library instead (which automatically has a dependency on the base library)
  implementation ''

Each KTX library provides different syntactic extensions of the base library. For example, the Analytics KTX library makes it simpler to log events:

Before (using the base library)

val analytics = FirebaseAnalytics.getInstance();
val bundle = Bundle();
bundle.putString(FirebaseAnalytics.Param.ITEM_ID, id);
bundle.putString(FirebaseAnalytics.Param.ITEM_NAME, name);
bundle.putString(FirebaseAnalytics.Param.CONTENT_TYPE, "image");
analytics.logEvent(FirebaseAnalytics.Event.SELECT_ITEM, bundle);

After (using the KTX library instead)

firebaseAnalytics.logEvent(FirebaseAnalytics.Event.SELECT_ITEM) {
    param(FirebaseAnalytics.Param.ITEM_ID, id)
    param(FirebaseAnalytics.Param.ITEM_NAME, name)
    param(FirebaseAnalytics.Param.CONTENT_TYPE, "image")

All the Firebase products offer a KTX library except for Firebase ML and App Indexing.

If you haven't yet, check out the API reference docs for the KTX libraries.

Open source resources for Firebase Android SDKs

Firebase supports open source development, and we encourage community contributions and feedback.

Firebase Android SDKs

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

Quickstart samples

Firebase maintains a collection of quickstart samples for most Firebase APIs on Android. Find these quickstarts in our public Firebase GitHub quickstart repository.

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