Maaz Zindani

Loading the index…

↑↓ move↵ openesc close4072 pages
Flutter and app store releases

Gradle cannot find com.google.firebase:firebase-analytics-ktx

ErrorCould not find com.google.firebase:firebase-analytics-ktx:.

Short answer

Firebase moved the Kotlin extensions into the main modules and stopped releasing the -ktx modules in July 2025. The BoM from v34.0.0 no longer contains them, so a line without a version cannot resolve. Depend on firebase-analytics instead, keep the BoM, and update your imports.

  • Applies to Firebase Android BoM 34+, Android Gradle plugin 8.x, Flutter 3.x
  • Updated
  • By Maaz Zindani, Senior Software Engineer

Fix it fast

  1. 1Find out which cause you have

    Find every -ktx line in the Android module, and see which BoM version is imported.

    grep -rn "firebase-bom\|-ktx" android/app/build.gradle* android/build.gradle*
  2. 2Match what you see, then jump to its fix

    1. 1The error ends with the module name and a colon with nothing after it, and the build file has a platform(...firebase-bom...) lineA -ktx module is declared without a version, next to a BoM from v34.0.0Fix
    2. 2build.gradle has a firebase library line without a version and no firebase-bom platform lineThe line has no version and no BoM is importedFix

What does the error look like?

  • Could not find com.google.firebase:firebase-analytics-ktx:.
  • Required by: project :app

Cause 1 of 2

A -ktx module is declared without a version, next to a BoM from v34.0.0

1Check

A BoM supplies the version of every library it lists. Firebase removed the KTX libraries from the BoM in v34.0.0, so a -ktx line has no version to take from it.

grep -n "firebase-bom\|firebase-analytics" android/app/build.gradle*

2Fix

Replace the -ktx module by the main module. The Kotlin extensions live there now. Use BoM v32.5.0 or higher.

dependencies {
    implementation platform('com.google.firebase:firebase-bom:35.2.0')
    // before: implementation 'com.google.firebase:firebase-analytics-ktx'
    implementation 'com.google.firebase:firebase-analytics'
}

3Verify

Resolve the dependencies of the app module.

cd android && ./gradlew :app:dependencies --configuration releaseRuntimeClasspath | grep firebase-analytics

Confirmed by firebase.google.com

Did this fix it?

Cause 2 of 2

The line has no version and no BoM is imported

1Check

Versions can only be left out of a Firebase library line when the BoM is imported. Without it, Gradle has no version to look for.

grep -n "platform(\|firebase-bom" android/app/build.gradle*

2Fix

Import the BoM once with platform(...), and keep individual library lines without versions.

dependencies {
    implementation platform('com.google.firebase:firebase-bom:35.2.0')
    implementation 'com.google.firebase:firebase-analytics'
}

3Verify

Sync Gradle and build.

cd android && ./gradlew :app:assembleDebug

Confirmed by firebase.google.com

Did this fix it?

How do I stop it coming back?

  • Use main Firebase modules, not -ktx ones, in any new Android code.
  • Import the BoM once and leave versions off the library lines.
  • After the move, fix imports: com.google.firebase.ktx.Firebase becomes com.google.firebase.Firebase.

Sources

How was this page made?

I drafted this page with AI assistance from the official documents listed under Sources. Every cause above names the document that confirms it. I have not reproduced this fix on a machine of my own yet, so read it as documented guidance, not a test report. Found a mistake? Tell me.

Which stack is behind this page?

Projects of mine built on the same technologies:

Related fixes

Mobile apps

Flutter Android: Failed to load FirebaseOptions from resource

Failed to load FirebaseOptions from resource. Check that you have defined values.xml correctly.

On Android, Firebase reads its settings from a values.xml file that the Google services Gradle plugin builds from google-services.json.

4 causes, each with a fix

Mobile apps

Google Play says the app does not support 16 KB memory pages

check_elf_alignment.sh reports UNALIGNED for a library under lib/arm64-v8a

Google Play requires apps that target Android 15 or higher and ship native .so libraries to run on devices with 16 KB memory pages; from 1 February 2027 it will block updates that do not.

5 causes, each with a fix

Next step

Want this handled for good?

I look after servers, apps and releases end to end. Tell me what keeps breaking.