Google Services plugin cannot work without google-services.json

The file google-services.json is missing. Google Services plugin cannot function

I am getting this error code since I deleted my file google-services.jsonfrom my project. Now, the obvious way to solve this problem would be to turn it on again, but I had a reason to remove it.

" Note: If only Google is logged in when you created the configuration file, you can skip this step. Google Sign-In does not require the configuration file that must be included in your project generating the file. It performs the necessary configuration steps. "is the official note in the documentation, and since I only enabled Google login I don’t see the reason for this error message. Someone also had this problem, and solve it, because I think I did everything correctly.

Note. It works with the file in the project.

EDIT: To clarify, my application works perfectly fine and I have no problems, but I was wondering why I cannot delete the Google-services.json file, even if I should be able to do this with no problems!

+4
source share
3 answers

When you add apply plugin: 'com.google.gms.google-services'inside your application level build.gradle, it analyzes the configuration information from the file google-services.json.

google-services.json, . build.gradle , , .

apply plugin: 'com.google.gms.google-services
+6

gradle -plugin google-, , - ! , , ! , google-services json .

+1

Are you using Google signin correctly? So you definitely need google-services.json file.

Link to this link

https://developers.google.com/identity/sign-in/android/start-integrating

Add the dependency to your build.gradle project:

classpath 'com.google.gms: google-services: 3.0.0'

Add the plugin to your build level:

apply plugin: 'com.google.gms.google-services'

-1
source

Source: https://habr.com/ru/post/1672673/


All Articles