Short answer
Raise the com.google.gms.google-services plugin version to the one in Firebase’s Android setup guide (4.3.14 or later). In a Flutter app that line is in android/settings.gradle(.kts); in older projects it is a classpath line in android/build.gradle. Then run flutter clean (or ./gradlew clean) and build again.
Why the task fails, and the fix
01
An old google-services plugin with a newer Android Gradle plugin
“google-services plugin 4.3.14 Improved task caching and awareness of changes in google-services.json files.” Firebase, Firebase Android release notes
An old plugin, 4.3.13 or earlier, often triggers it on newer Android Gradle plugin releases, and developers report the error going away on 4.3.14 or later, whose release notes mention improved task caching. Use the version in Firebase’s setup guide (4.5.0 on November 8, 2026). Change only the version number and keep apply false.
// android/settings.gradle.kts (Flutter) plugins { id("com.google.gms.google-services") version "4.5.0" apply false } // or android/build.gradle (older buildscript style) // classpath 'com.google.gms:google-services:4.5.0'02
The version is set in a place you didn’t change
“In your root-level (project-level) Gradle file (<project>/build.gradle.kts or <project>/build.gradle), add the Google services Gradle plugin as a dependency:” Firebase, Add Firebase to your Android project
Projects that went through several Flutter templates can declare the plugin twice: a classpath in android/build.gradle and a plugins line in android/settings.gradle. Search both and keep one, at the current version.
grep -rn "google-services" android/*.gradle* android/app/build.gradle*03
Old build output after the version change
Gradle can keep failing on cached task output from the old plugin. Clean once, then build.
flutter clean flutter pub get flutter run # native Android ./gradlew clean assembleDebug
Checked against the vendor’s docs on : Firebase: Add Firebase to your Android project; Firebase Android release notes (google-services plugin).
Rather hand it over?
Fixed scope, fixed price, paid upfront. The work happens in writing; no call needed.
- from $450App Fix TicketOne reproducible bug in an existing mobile or web app, diagnosed and fixed.See scope and start
- from $450AI-Built App RescueA Lovable, Bolt or Cursor app checked end to end in 3 days, then its worst problems fixed at a fixed price.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
Related: Firebase “google-services” plugin not found · Gradle “Could not resolve all files” · Android “SDK location not found” · Firebase auth/network-request-failed