Gradle cannot find com.google.firebase:firebase-analytics-ktx
Could 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.
Fix it fast
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*2Match what you see, then jump to its fix
- 1
The 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
build.gradle has a firebase library line without a version and no firebase-bom platform lineThe line has no version and no BoM is importedFix
- 1
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-analyticsConfirmed by firebase.google.com
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:assembleDebugConfirmed by firebase.google.com
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:
- SessionBirdAn omnichannel engagement suite in Flutter: campaigns, chatbot, tickets, analytics and live calling.
- WorkforceA field app, an admin console and a self-hosted Node.js server for push and reconciliation.
- Spotless LaundryAn on-demand laundry app: Flutter on a Laravel back end, with Firebase for live updates.
Related fixes
Mobile apps
Flutter on Android: Missing google_app_id and Firebase Analytics disabled
Missing google_app_id. Firebase Analytics disabled.
The Firebase Android SDK reads your app ID from values the Google services Gradle plugin generates from google-services.json.
3 causes, each with a fixMobile 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 fixMobile apps
Flutter phone sign-in fails with status 17028 and play_integrity_token
SMS verification code request failed: unknown status code: 17028 Invalid request fields in play_integrity_token
Firebase checks the app with Play Integrity before sending an SMS, and that check needs your SHA-256 fingerprint.
3 causes, each with a fixMobile apps
Google Sign-In in Flutter fails with PlatformException sign_in_failed, code 10
GoogleSignInExceptionCode.clientConfigurationError
Code 10 means Google could not match your app to an OAuth client.
3 causes, each with a fixMobile 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 fixMobile apps
FirebaseInstanceIdService and FirebaseInstanceId.getToken() no longer work
Deprecation warning on FirebaseInstanceId.getInstance().getToken()
Move token handling into a class that extends FirebaseMessagingService and override onNewToken, which runs when a token is first created and whenever it changes.
2 causes, each with a fix