Since I updated com.google.gms:google-services
from version 4.2.0 to 4.3.0 in my top level build.gradle, I cannot compile my project any more because I have the error :
"File google-services.json is missing"
My google-services.json
are in :
/My/personnal/project/app/src/ProductFlavors/BuildTypes
(for example)
/My/personnal/project/app/src/AT/debug
/My/personnal/project/app/src/DE/debug
/My/personnal/project/app/src/AT/release (...)
When my version is 4.2.0, I have no issue but in 4.3.0 I have the error and the Searched Location is: /My/personnal/project/app/google-services.json
not working
dependencies {
classpath 'com.android.tools.build:gradle:3.4.2'
classpath 'com.google.gms:google-services:4.3.0'
}
working
dependencies {
classpath 'com.android.tools.build:gradle:3.4.2'
classpath 'com.google.gms:google-services:4.2.0'
}
EDIT 1
Looks like it has been resolved with version 4.3.1
EDIT 2
Looks like issue is back on version 4.3.2 :(
EDIT 3
Issue still there with 4.3.3 :(
The google-services. json file is generally placed in the app/ directory (at the root of the Android Studio app module).
File google-services.json is missing. The Google Services Plugin cannot function without it. Searched Location: C:\Users\vikas\AndroidStudioProjects\FireBaseFunctionality\app\src\debug\google-services.json C:\Users\vikas\AndroidStudioProjects\FireBaseFunctionality\app\google-services.json are you sure you've copied it to the root of your project?
That Problem is because:- The folder or file you pasted to your product downloaded from the firebase console is not named as google-services.json. so now click it then right mouse click in all the options open refractor and rename it to google-services.json. because this worked for me Had faced same issue ..
Just refactoring the file to google-services.json from google_services.json works like charm.. Hope this helps!!! P.S. I know it's sound silly but this only works for me... Navigate to your project folder and open the /app sub-folder. Paste the .json file here. Rebuild the project.
If your Android project has some configuration that prevents you from using the google-services plugin, you can safely recreate the XML files manually using these values: Q: When building I get the following error message: "File google-services.json is missing from module root folder.
There is already an open issue on github based on this
https://github.com/google/play-services-plugins/issues/91
The problem is google-services plugin ignores the build variant if it starts with a capital letter.
If you refactor the build variant names to camelCase, then it seems to detect the google-services.json file.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With