Skip to content

Firebase Android build errorAndroid: “Plugin with id 'com.google.gms.google-services' not found”

An Android or Flutter build with Firebase fails with Plugin with id 'com.google.gms.google-services' not found, or Plugin [id: 'com.google.gms.google-services'] was not found in any of the following sources. The app module asks for the Google services plugin, but the project never told Gradle where to get it or which version to use.

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.

Where the declaration is missing, and the fix

  1. 01

    Applied in the app, not declared at the project level

    “add the Google services Gradle plugin as a dependency” 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.

    // 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.4.2" apply false // example version
    }
    // Groovy (build.gradle / settings.gradle):
    // id "com.google.gms.google-services" version "4.4.2" 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"
  2. 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.4.2" apply false
    }
    
    // android/settings.gradle (Groovy)
    // id "com.google.gms.google-services" version "4.4.2" apply false
  3. 03

    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.4.2'
      }
    }
    
    // android/app/build.gradle (last line)
    apply plugin: 'com.google.gms.google-services'
  4. 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.

Related: Firebase “No Firebase App [DEFAULT] has been created” · Google Sign-In DEVELOPER_ERROR on Android · Gradle “Could not resolve all files” · Firebase auth/popup-blocked

Questions

More on this error

Which version should I use?

Use the version the Firebase Android setup page shows today; the code here uses 4.4.2 as an example. Keep it in one place, the project-level declaration, so the app module doesn’t name a version.

Now it says File google-services.json is missing. What next?

Download google-services.json from the Firebase console (Project settings, your Android app) and put it in android/app. The package name in the file must match applicationId in the app’s build.gradle.

Can you fix it for me?

If one bug is the whole problem, the App Fix Ticket covers it: a written diagnosis first, then the fix. If the app has more going on, the Launch Check is a written check of the whole app. Each issue found is rated critical, high, medium or low, with where it is and how it was confirmed. 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.

A different error?

Describe it and get a written quote

Send the error and what you were doing. You get a written scope, a fixed price and a timeline; Simon replies by email, usually within one business day.