Troubleshooting & FAQ for Android and Firebase

This page offers tips and troubleshooting for Android-specific issuesthat you might encounter when using Firebase.

Have other challenges or don't see your issue outlined below? Make sure to checkout themain Firebase FAQ for more pan-Firebase orproduct-specific FAQ.

You can also check out theFirebase Android SDK GitHub repo for an up-to-date list of reported issues and troubleshooting. We encourage youto file your own Firebase Android SDK related issues there, too!

I'm getting an error that thektx library failed to resolve or could not be found.

This error is likely because you're using theFirebase BoM and specifying a KTX module as your product library dependency.

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

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

Do I need to provide a SHA-1 when adding an Android app to a Firebase project?

SHA-1 information is required byFirebase Authentication (when usingGoogle signin orphone number signin) andFirebase Dynamic Links. If you're not using these features, you don't have to provide a SHA-1.

How do I resolve this error: "An OAuth2 client already exists for this package name and SHA-1 in another project"?

This error occurs if we detect that another Firebase orGoogle Cloud project contains an OAuth 2.0 client ID with the package name and SHA-1 that you specified. Learn how toresolve this error.

When I add Firebase to my Android project, I get a "Could not find" error.

This error usually means that your app is missing one or more references to Google's Maven repository. Make sure to include Google's Maven repository (google()) in your Gradle Configuration file.

  • If your project is using theplugins syntax, include it in theplugins section in yoursettings.gradle.kts orsettings.gradle file.
  • If your project is using thebuildscript syntax, include it in both thebuildscript andallprojects sections in your project-levelbuild.gradle.kts orbuild.gradle file.

When I add a Firebase SDK to my Android project, I get an error about invoke-custom support and enabling desugaring.

In May 2021 (Firebase BoM v28.0.0), Firebase disabled desugaring for all itsAndroid libraries(seerelease note).

This change means that Gradle builds that use Android Gradle plugin (AGP) v4.2or earlier need to enable Java 8 support. Otherwise, when adding a Firebase SDK,these Android projects get the following build failure:

D8: Invoke-customs are only supported starting with Android O (--min-api 26)Caused by: com.android.builder.dexing.DexArchiveBuilderException: Error while dexing.The dependency contains Java 8 bytecode. Please enable desugaring by adding the following to build.gradleandroid {    compileOptions {        sourceCompatibility 1.8        targetCompatibility 1.8    }}See https://developer.android.com/studio/write/java8-support.html for details.Alternatively, increase the minSdkVersion to 26 or above.

To fix this build failure, you can follow one of two options:

  • Add the listedcompileOptions from the error message to yourapp-levelbuild.gradle.kts orbuild.gradle file.
  • Increase theminSdkVersion for your Android project to 26 or above.

Google Sign-in is showing the error "12500:" after I released my app. How do I fix it?

There are two possible reasons why this would happen: you haven’t provided a support email or you’re missing a SHA key. In order to fix this error, make sureall of these conditions are true:

How to add Firebase plugins to an Android project using thebuildscript syntax?

Tip: Considermigrating frombuildscript toplugin syntax as this allows Android Studio to perform code completion and provide other helpful suggestions.

Firebase has the following Gradle plugins:

Plugin nameMaven coordinatesLatest versionPlugin ID
Google Play services plugincom.google.gms:google-services4.4.4com.google.gms.google-services
App Distribution plugincom.google.firebase:firebase-appdistribution-gradle5.2.1com.google.firebase.appdistribution
Crashlytics plugincom.google.firebase:firebase-crashlytics-gradle3.0.6com.google.firebase.crashlytics
Performance Monitoring plugincom.google.firebase:perf-plugin2.0.2com.google.firebase.firebase-perf

Here's how to add a Firebase plugin to an Android project that still uses thebuildscript syntax:

  1. In yourroot-level (project-level) Gradle file(<project>/build.gradle.kts or<project>/build.gradle), add the plugin asa dependency using its Maven coordinates:

    Kotlin

    buildscript{repositories{// Make sure that you have the following two repositoriesgoogle()// Google's Maven repositorymavenCentral()// Maven Central repository}dependencies{...// Add the Maven coordinates and latest version of the pluginclasspath("PLUGIN_MAVEN_COORDINATES:PLUGIN_VERSION")}}allprojects{...repositories{// Make sure that you have the following two repositoriesgoogle()// Google's Maven repositorymavenCentral()// Maven Central repository}}

    Groovy

    buildscript{repositories{// Make sure that you have the following two repositoriesgoogle()// Google's Maven repositorymavenCentral()// Maven Central repository}dependencies{...// Add the Maven coordinates and latest version of the pluginclasspath'PLUGIN_MAVEN_COORDINATES:PLUGIN_VERSION'}}allprojects{...repositories{// Make sure that you have the following two repositoriesgoogle()// Google's Maven repositorymavenCentral()// Maven Central repository}}
  2. In yourmodule (app-level) Gradle file (usually<project>/<app-module>/build.gradle.kts or<project>/<app-module>/build.gradle), add the plugin using itsplugin ID:

    Kotlin

    plugins{id("com.android.application")// Add the ID of the pluginid("FIREBASE_PLUGIN_ID")...}

    Groovy

    plugins{id'com.android.application'// Add the ID of the pluginid'FIREBASE_PLUGIN_ID'...}

What open source notices should I include in my app?

The Firebase Android SDK contains ahelperActivity for showing license information.

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.