The Google Services plugin cannot find google-services.json in an Android app
File google-services.json is missing from module root folder. The Google Services Plugin cannot function without it.Short answer
The Google Services plugin looks for google-services.json in the app module folder, or in a build-type folder under src. Download the file again from the Firebase console, put it in app/ with its exact name, and make sure it holds a client entry for your package name.
Fix it fast
1Find out which cause you have
List where the file actually sits. The plugin only reads it from the module root or a src build folder, not from the project root.
find . -name "google-services*.json" -not -path "*/build/*"2Match what you see, then jump to its fix
- 1
find shows the file in the project root, or as google-services (2).jsonThe file is in the wrong folder or has a changed nameFix - 2
The default build works but a flavor or build type failsA build type or flavor needs its own copyFix - 3
The file exists but the build still fails or Firebase values are missingThe file has no client for your package nameFix
- 1
What does the error look like?
File google-services.json is missing from module root folder. The Google Services Plugin cannot function without it.
Cause 1 of 3
The file is in the wrong folder or has a changed name
1Check
The expected place is the root of the app module, usually app/. A browser download can add a suffix such as (2) to the name.
ls -l app/google-services.json2Fix
Download the file again from the Firebase console (Project settings, your Android app) and copy it to app/ under the exact name google-services.json.
mv ~/Downloads/google-services.json app/google-services.json3Verify
Sync Gradle and build the module.
./gradlew :app:assembleDebugConfirmed by firebase.google.com
Cause 2 of 3
A build type or flavor needs its own copy
1Check
From plugin version 2.2.0 you can keep one file per build type, such as app/src/release/ or app/src/dogfood/. With product flavors, nested folders like app/src/dogfood/paid/ are valid too.
find app/src -name google-services.json2Fix
Put a file in the folder for each build type or flavor that builds, or keep one copy in app/ that covers them all.
app/google-services.json
# or one per build type
app/src/release/google-services.json3Verify
Build each variant that failed.
./gradlew :app:assembleReleaseConfirmed by firebase.google.com
Cause 3 of 3
The file has no client for your package name
1Check
The plugin only uses the client entry that matches your app's package name. Compare the name in the file with the application ID in the module build file. The name is case-sensitive and cannot be changed after registering the app.
grep -n "package_name" app/google-services.json
grep -n "applicationId" app/build.gradle app/build.gradle.kts 2>/dev/null2Fix
Register an Android app in Firebase with the exact application ID you build, then download the new file. If you build several IDs, add each one to the Firebase project.
# Firebase console: Project settings > Your apps > Add app3Verify
Rebuild; the plugin should accept the file.
./gradlew :app:assembleDebugConfirmed by firebase.google.com
How do I stop it coming back?
- Commit the file (or fetch it in CI) so a fresh clone can build.
- Check the file name after every download; remove suffixes like (2).
- Register each build type's application ID in Firebase before you add it.
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:
- QistLockA NestJS and React SaaS driving an Android Device Owner agent that locks financed phones when payments lapse.
- SessionBirdAn omnichannel engagement suite in Flutter: campaigns, chatbot, tickets, analytics and live calling.
- WorkforceA field app, an admin console and a self-hosted Node.js server for push and reconciliation.
Related fixes
Mobile apps
Gradle cannot find com.google.firebase:firebase-analytics-ktx
Required by: project :app
Firebase moved the Kotlin extensions into the main modules and stopped releasing the -ktx modules in July 2025.
2 causes, each with a fixMobile apps
FirebaseInstanceIdService and FirebaseInstanceId.getToken() no longer work
Deprecation warning on FirebaseInstanceId.getInstance().getToken()
Move token handling into a class that extends FirebaseMessagingService and override onNewToken, which runs when a token is first created and whenever it changes.
2 causes, each with a fixMobile apps
Expo Android push fails because google-services.json is missing
"google-services.json" is missing for firebase
Android push in Expo goes through Firebase Cloud Messaging, which needs two separate things: the google-services.json file inside the app, pointed to by android.googleServicesFile, and a service account key uploaded to Expo for sending.
2 causes, each with a fixMobile apps
Logcat warns that FCM has no default notification channel in AndroidManifest
Notification does not appear on Android 8 and later
This is a warning, not a crash.
3 causes, each with a fixMobile apps
Flutter Android: Failed to load FirebaseOptions from resource
Failed to load FirebaseOptions from resource. Check that you have defined values.xml correctly.
On Android, Firebase reads its settings from a values.xml file that the Google services Gradle plugin builds from google-services.json.
4 causes, each with a fixMobile apps
Flutter phone sign-in fails with status 17028 and play_integrity_token
SMS verification code request failed: unknown status code: 17028 Invalid request fields in play_integrity_token
Firebase checks the app with Play Integrity before sending an SMS, and that check needs your SHA-256 fingerprint.
3 causes, each with a fix