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
September 26, 2026
Official info checked
September 26, 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.

Quick answer

The Google Services Gradle Plugin is running for an Android application module but cannot find the google-services.json configuration file for that module or build variant.

For a standard Android app, download google-services.json from the Firebase Console for the correct Firebase Android app and place it in:

app/google-services.json

For build-type-specific configuration, use the matching supported source-set location such as:

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

In Flutter and bare React Native projects, the same file goes one level deeper, into the nested Android application module:

Android:           app/google-services.json
Flutter:           android/app/google-services.json
Bare React Native: android/app/google-services.json

The file must be the configuration for the Android app whose package name matches the applicationId of the variant you are building. Do not copy an arbitrary google-services.json from another Firebase app.

If you need to verify what the file contains, whether it belongs in Git, or which Firebase app it came from, see What Is google-services.json? Placement, Updates, and Project Checks.

What does module root folder mean?

“Module root” means the root directory of the Android application module — the module on which com.android.application and com.google.gms.google-services are applied.

It does not mean:

  • the repository root
  • the Flutter project root
  • the android/ directory of a Flutter or React Native project
  • an arbitrary shared or library module

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

Use the Gradle task name to identify the failing module

The task path in the error output tells you which module the plugin ran for. If the failing task is:

:app:processDebugGoogleServices

the application module is usually:

app

If the failing task is instead:

:customerApp:processProductionGoogleServices

the module to check is:

customerApp

Task naming can differ between setups. Use the task path as a troubleshooting clue and confirm the module’s Gradle plugins before changing anything.

Fastest troubleshooting sequence

  1. Read the failing Gradle task and identify the application module
  2. Confirm that module applies com.android.application
  3. Confirm where com.google.gms.google-services is applied
  4. Download google-services.json for the correct Firebase Android app/package
  5. Put it in the module root or the appropriate build-type/flavor source set
  6. Verify the filename is exactly google-services.json
  7. If CI only fails, verify that the file exists before the Gradle task runs
  8. Rebuild

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 does not search arbitrary directories in the repository. Putting google-services.json in the project root or in the android/ directory does not make it available to an app module simply because the file exists somewhere in the project. The plugin reads the application module directory and the source sets that match the variant being built.

The project root is not the application module root, and a Flutter or React Native android/ directory is not the same as android/app/.

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.

Do not copy google-services.json into every module just to make the build green. Before placing the file, confirm:

  • which module applies com.android.application
  • where com.google.gms.google-services is applied
  • whether that module actually consumes the Firebase configuration

A library module does not need the file merely because the project contains Firebase.

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.

For example, if the failing task is :shared:processDebugGoogleServices while shared is supposed to be an Android library, investigate why the Google Services plugin is applied there instead of adding a Firebase configuration file blindly. Removing the plugin is not automatically the fix either: some setups apply it intentionally outside Firebase, so confirm whether the module genuinely needs the plugin before changing its Gradle files.

What if this module does not use Firebase or Google services?

Do not create a dummy google-services.json only to satisfy the build.

First confirm why com.google.gms.google-services is applied to that module. The plugin is not used by Firebase alone — some setups apply it for other Google services features such as Google Sign-In — so removing it is not automatically correct.

If the module genuinely does not require the plugin or the resources it generates, correct the Gradle configuration rather than supplying an unrelated Firebase configuration file.

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/<flavor>/google-services.json

For example:

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

The Flutter project root and its android/ directory are not the module root. Common incorrect locations include:

wrong:  my_flutter_app/google-services.json
wrong:  my_flutter_app/android/google-services.json
usual:  my_flutter_app/android/app/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

Then verify that the file exists before the Gradle task runs:

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

Keep that order — restore step, existence check, then the Gradle build — so a missing restore fails fast instead of surfacing as the module-root error. Do not print the full file or API-key values to CI logs.

Firebase describes the identifiers in google-services.json as non-secret. Whether you commit the file or restore it in CI is a repository/deployment policy decision. The build requirement is simply that the correct file exists at the expected module or source-set path before the Google Services Gradle task runs. The Git-handling trade-offs are covered in What Is google-services.json? Placement, Updates, and Project Checks.

When a different error appears after fixing the path

If the missing-file error disappears and the next error is:

No matching client found for package name

the plugin is now finding the file; the next issue is package/applicationId matching. 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.