Flutter build fails: File google-services.json is missing
File google-services.json is missing from module root folder. The Google Services Plugin cannot function without itShort 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.
Fix it fast
1Find out which cause you have
Check whether the file exists where the plugin looks.
ls -l android/app/google-services.json2Match what you see, then jump to its fix
- 1
ls 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
The folder holds google-services (1).json or similarThe browser renamed the downloadFix - 3
You 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
- 1
What does the error look like?
File google-services.json is missing from module root folder. The Google Services Plugin cannot function without itgoogle-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.json3Verify
Build the app again.
flutter clean && flutter runConfirmed by firebase.google.com
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 google2Fix
Rename it to google-services.json.
mv "android/app/google-services (1).json" android/app/google-services.json3Verify
The build no longer reports the missing file.
flutter build apk --debugConfirmed by firebase.google.com
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.json2Fix
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.json3Verify
Build the failing variant.
flutter build apk --releaseConfirmed by firebase.google.com
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:
- TaxiDexMy own multi-tenant taxi dispatch SaaS: API, dispatcher portal, driver and passenger apps, and the servers underneath.
- QistLockA NestJS and React SaaS driving an Android Device Owner agent that locks financed phones when payments lapse.
- Dispatch ProA real-time logistics platform: Flutter apps, Spring Boot services and a Kafka event pipeline on AWS.
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 fixMobile 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
Gradle cannot create LibraryVariantBuilderImpl in a Flutter Android build
Could not create an instance of type com.android.build.api.variant.impl.LibraryVariantBuilderImpl
This error appears when the Android Gradle plugin (AGP) cannot run in the Gradle or IDE you use.
3 causes, each with a fixMobile apps
Flutter release build cannot open the keystore: HmacPBESHA256 not available
Algorithm HmacPBESHA256 not available
The keystore is a PKCS12 file protected by a newer algorithm than the Java that is reading it understands.
3 causes, each with a fixMobile apps
Android install error: the package conflicts with an existing package of the same name
The package conflicts with an existing package by the same name
Android allows only one app per application ID, and an update must be signed with the same certificate as the installed version.
3 causes, each with a fixMobile apps
Android resource linking fails with resource android:attr/lStar not found
error: failed linking references.
The lStar attribute exists only from Android API 31.
2 causes, each with a fix