Maaz Zindani

Loading the index…

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

Flutter build fails: File google-services.json is missing

ErrorFile google-services.json is missing from module root folder. The Google Services Plugin cannot function without it

Short answer

The Google services Gradle plugin looks for google-services.json in the Android app module root. In a Flutter project that is android/app/google-services.json, not the project root or android/. Keep the original file name, and use a build type or flavor folder only if you build with those.

  • Applies to Flutter 3.3x stable, Android Gradle Plugin 8.x, Google services plugin 4.x
  • Updated
  • By Maaz Zindani, Senior Software Engineer

Fix it fast

  1. 1Find out which cause you have

    Check whether the file exists where the plugin looks.

    ls -l android/app/google-services.json
  2. 2Match what you see, then jump to its fix

    1. 1ls says no such file, but the file exists in the project root, in android/, or in lib/The file is in the wrong folderFix
    2. 2The folder holds google-services (1).json or similarThe browser renamed the downloadFix
    3. 3You build with several build types or flavors and keep per-variant folders under android/app/srcYou build with build types or flavors but the file sits only in the app rootFix

What does the error look like?

  • File google-services.json is missing from module root folder. The Google Services Plugin cannot function without it
  • google-services.json is missing

Cause 1 of 3

The file is in the wrong folder

1Check

Find every copy in the project.

find . -name "google-services*.json" -not -path "./build/*"

2Fix

Download it again from the Firebase console if needed, and put it in android/app/, the root of the app module.

mv android/google-services.json android/app/google-services.json

3Verify

Build the app again.

flutter clean && flutter run

Confirmed by firebase.google.com

Did this fix it?

Cause 2 of 3

The browser renamed the download

1Check

A second download often gets a number added to the name. The plugin only looks for the exact name.

ls android/app | grep -i google

2Fix

Rename it to google-services.json.

mv "android/app/google-services (1).json" android/app/google-services.json

3Verify

The build no longer reports the missing file.

flutter build apk --debug

Confirmed by firebase.google.com

Did this fix it?

Cause 3 of 3

You build with build types or flavors but the file sits only in the app root

1Check

The docs allow a per build type copy such as app/src/release/google-services.json, and flavor folders like app/src/dogfood/paid/. List what you have.

find android/app/src -name google-services.json

2Fix

Make sure each variant you build can find a file: either keep one in android/app/, or place one in the folder that matches the build type or flavor.

android/app/src/release/google-services.json
android/app/src/<flavor>/google-services.json

3Verify

Build the failing variant.

flutter build apk --release

Confirmed by firebase.google.com

Did this fix it?

How do I stop it coming back?

  • Commit the file decision to a short README note: who downloads it and where it goes.
  • Check the package name in the file matches applicationId in android/app/build.gradle.kts; a mismatch can cause missing resource symbols.
  • Download the file from the Firebase console for the exact app, not a different one in the same project.

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

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.