Short answer
Declare the plugin with a version at the project level, then apply it in the app module. In a plugins-block project, add id("com.google.gms.google-services") version "4.x.x" apply false to the root build.gradle(.kts), or to settings.gradle(.kts) in a current Flutter project, and id("com.google.gms.google-services") to android/app/build.gradle(.kts). In an older buildscript project, add the classpath instead. Make sure google-services.json is in the app folder.
Rather not fix it yourself? App Fix Ticket fixes one reproducible bug at a fixed price, with an optional Diagnosis that is credited toward the fix.
Where the declaration is missing, and the fix
01
Applied in the app, not declared at the project level
“id 'com.google.gms.google-services' version '4.5.0' apply false” Firebase, Add Firebase to your Android project
The plugin needs two lines: one at the project level that names the version without applying it, and one in the app module that applies it. A tutorial that shows only the app line leaves the first one out. Firebase shows the project-level line in the root build file; Flutter templates put the same plugins block in settings.gradle.
// project level, ONE place only: android/build.gradle.kts, or android/settings.gradle.kts in Flutter plugins { // keep your existing plugins id("com.google.gms.google-services") version "4.5.0" apply false // example version } // Groovy (build.gradle / settings.gradle): // id "com.google.gms.google-services" version "4.5.0" apply false // android/app/build.gradle.kts plugins { id("com.android.application") id("com.google.gms.google-services") } // Groovy: id "com.google.gms.google-services"02
A Flutter project that uses settings.gradle
“As part of adding Firebase to your Android project, you need to add the google-services Gradle plugin and a google-services.json configuration file to your project.” Firebase, Google services Gradle plugin and JSON config file
Flutter projects created with recent versions declare plugins in android/settings.gradle(.kts), not in a buildscript block. Add the google-services line there with apply false. The FlutterFire CLI (flutterfire configure) adds both lines for you.
// android/settings.gradle.kts (add one line, keep the rest) plugins { id("dev.flutter.flutter-plugin-loader") version "1.0.0" // ...your existing com.android.application and kotlin lines id("com.google.gms.google-services") version "4.5.0" apply false } // android/settings.gradle (Groovy) // id "com.google.gms.google-services" version "4.5.0" apply false03
An older project that uses buildscript
Projects with a buildscript block in the root build.gradle declare the plugin as a classpath dependency and apply it with apply plugin at the bottom of app/build.gradle. Keep the version in one place (the classpath or a plugins block), not both.
// android/build.gradle buildscript { repositories { google() } dependencies { classpath 'com.google.gms:google-services:4.5.0' } } // android/app/build.gradle (last line) apply plugin: 'com.google.gms.google-services'04
The plugin repository isn’t available
Gradle fetches the plugin from Google’s Maven repository. Check that google() is listed in pluginManagement repositories (settings.gradle) or buildscript repositories, and that the build isn’t running offline.
Checked against the vendor’s docs on : Firebase: Add Firebase to your Android project; Firebase: Google services Gradle plugin and JSON config file.
Rather hand it over?
Fixed scope, fixed price, paid upfront. The work happens in writing; no call needed.
- from $450App Fix TicketOne reproducible bug. The Fix costs $1,200. If you need a Diagnosis first, its $450 fee counts toward the Fix.See scope and start
- from $450AI-Built App RescueFor a whole-app review, the $450 Launch Check is credited toward the optional $1,950 Rescue Sprint for up to five critical or high findings.No issues worth fixing, no charge. If the Launch Check finds nothing rated medium or higher, Simon refunds the full $450. You keep the report either way. This applies to the first 10 Launch Checks bought after October 30, 2026.See scope and start
“Very responsive, attentive to fixing bugs, and completed the project as needed! Thank you!”
Related: Firebase “No Firebase App [DEFAULT] has been created” · Google Sign-In DEVELOPER_ERROR on Android · Gradle “Could not resolve all files” · Android google-services “version conflict”