File google-services.json is missing. The Google Services Plugin cannot function
I get this error code since I deleted my google-services.json
file from my project. Now the obvious way to solve this issue would be to include it again, but I had a reason to remove it.
"Note: If you enabled only Google Sign-In when you generated the configuration file, you can skip this step. Google Sign-In does not require the configuration file to be included in your project—generating the file performs the neecessary configuration steps." - this is the official note in the documentation and since I only enabled Google Sign-In I don't see a reason for this error message. Does anyone have had this problem too and a solve to it because I think that I implemented everything correctly.
Note: It works with the file in the project included.
EDIT: To clarify, my application works completely fine and I have no problems, but I wondered why I cannot remove the google-services.json file even though I should be able to do it with no problem!
PLEASE NOTE: The google-services. json file is a different file to your Google Play Services API Key. The google-services. json file created in this doc is used within your app to connect to firebase and facilitate Android Push Notifications and is normally labelled google-services. json.
Adding the JSON File The google-services. json file is generally placed in the app/ directory (at the root of the Android Studio app module).
When you add apply plugin: 'com.google.gms.google-services'
inside your app-level build.gradle
it parses configuration information from the google-services.json
file.
You removed google-services.json
file, that's why it is not able to parse
So remove the below line too from your app-level build.gradle
who triggered parsing to make it work again.
apply plugin: 'com.google.gms.google-services'
You are using Google signin right? So u definitely need a google-services.json file
Refer this link
https://developers.google.com/identity/sign-in/android/start-integrating
Add the dependency to your project-level build.gradle:
classpath 'com.google.gms:google-services:3.0.0'
Add the plugin to your app-level build.gradle:
apply plugin: 'com.google.gms.google-services'
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