TestCrew
Firebase and Android Setup

Fix File google-services.json Is Missing from Module Root Folder

Fix the missing google-services.json module root error in Android, Flutter, React Native, Expo, and CI by checking module paths, variants, plugins, and file restoration.

Published
August 2, 2026
Updated
August 5, 2026
Official info checked
August 2, 2026
TestCrew guide cover for fixing a missing google-services.json module root error

When building an Android app, you may see this error:

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

The same error can occur during the Android build of a Flutter or React Native app.

It means the Google Services Gradle Plugin is enabled, but it cannot find google-services.json from the application module being built.

What does module root folder mean?

The module root folder is not the root of the entire project.

It is normally the directory of the application module where com.android.application is applied.

A standard Android project looks like this:

MyApp/
├── app/
│   ├── build.gradle.kts
│   ├── google-services.json
│   └── src/
├── build.gradle.kts
└── settings.gradle.kts

The usual correct location is:

app/google-services.json

A common incorrect location is:

MyApp/google-services.json

Fastest troubleshooting sequence

  1. Download the JSON file for the correct Android app from Firebase
  2. Name the file exactly google-services.json
  3. Identify the application module being built
  4. Place the file directly under that module
  5. Check where com.google.gms.google-services is applied
  6. Check build-variant and flavor-specific directories
  7. Restore the file before the build in CI
  8. Run a clean build

Cause 1: The file name is wrong

Downloading the file multiple times can produce names such as:

google-services (1).json
google-services (2).json

The plugin looks for this exact name:

google-services.json

When file extensions are hidden on Windows, the real file name may be:

google-services.json.json
google-services.json.txt

Display file extensions and verify the full name.

Cause 2: The file is in the project root

Incorrect:

project/google-services.json

Usual correct location:

project/app/google-services.json

The Google Services Gradle Plugin searches the application module and matching source sets for its configuration file.

Cause 3: The file is in another module

A project with multiple application modules may not use the name app.

project/
├── customerApp/
├── adminApp/
└── shared/

When building customerApp, place the file here:

customerApp/google-services.json

Identify an application module by this Gradle plugin:

plugins {
    id("com.android.application")
}

Do not confuse it with a module that applies com.android.library.

Cause 4: The plugin is applied to a different module

The module containing the JSON must match the module where the Google Services Plugin is applied.

plugins {
    id("com.android.application")
    id("com.google.gms.google-services")
}

If the plugin is applied to another module, that module can produce the missing-file error instead.

Build-type and flavor-specific locations

The Google Services Gradle Plugin supports configuration files for specific environments.

Debug and release

app/src/debug/google-services.json
app/src/release/google-services.json

Product flavors

app/src/development/google-services.json
app/src/production/google-services.json

When only one variant fails, check whether a file is available for that variant and whether a more specific source-set path is expected.

Location in a Flutter project

In a standard Flutter project, the Android application module is usually:

android/app/

The normal location is therefore:

android/app/google-services.json

Common incorrect locations include:

flutter_project/google-services.json
flutter_project/android/google-services.json

When using FlutterFire CLI, run the configuration and rebuild commands again after correcting the project selection:

flutterfire configure
flutter clean
flutter pub get

Location in a React Native project

In a typical bare React Native project, use:

android/app/google-services.json

Confirm that the Gradle file reporting the error and the JSON file belong to the same Android application module.

Expo configuration

An Expo app can specify the JSON path in its app configuration:

{
  "expo": {
    "android": {
      "googleServicesFile": "./google-services.json"
    }
  }
}

Check all of the following:

  • The file exists at the configured path
  • EAS Build receives the file
  • android.package matches the package registered in Firebase
  • Development and production files have not been swapped

When only CI fails

The file may exist locally but be excluded by .gitignore, which means it is unavailable to CI.

Example of restoring it from a Base64-encoded GitHub Actions secret:

- name: Restore google-services.json
  run: |
    mkdir -p android/app
    echo "${{ secrets.GOOGLE_SERVICES_JSON_BASE64 }}" \
      | base64 --decode \
      > android/app/google-services.json

Verify its presence before the build:

- name: Verify Firebase config
  run: test -f android/app/google-services.json

Do not print the full file or API-key values to CI logs.

When a different error appears after fixing the path

After the plugin can read the file, the error may change to:

No matching client found for package name

This means the file is now found, but the current applicationId does not match a package_name in the JSON.

Treat the missing-file problem and the package-name mismatch as separate issues. See Fix No Matching Client Found for Package Name for the next checks.

Build after correcting the location

Android:

./gradlew clean
./gradlew assembleDebug

Flutter:

flutter clean
flutter pub get
flutter run

Clear build caches after placing the correct file, not as a substitute for correcting the path.

Summary

The basic locations are:

Android:               app/google-services.json
Flutter / React Native: android/app/google-services.json
Flavor:                app/src/{flavor}/google-services.json

Start by identifying the application module that reports the error and the module where com.google.gms.google-services is applied.

Primary sources

Official references

Check the linked official documentation before a production release.

Continue reading

TestCrew

Find testers through mutual testing

Test other Android apps, provide useful feedback, and use earned credits to recruit testers for your own Google Play closed test.

Learn how TestCrew works

Analytics settings

TestCrew uses Google Analytics provided by Google LLC to improve the website. You can change whether it is used; this applies to future measurement on this page and later visits. See the Privacy Policy.