Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Services Plugin cannot function without google-services.json [duplicate]

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!

like image 247
creativecreatorormaybenot Avatar asked Mar 19 '17 14:03

creativecreatorormaybenot


People also ask

What is Google service json?

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.

Where is Google services json in flutter project?

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).


2 Answers

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'
like image 147
Abhishek Aryan Avatar answered Oct 17 '22 09:10

Abhishek Aryan


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'

like image 45
karthik Avatar answered Oct 17 '22 07:10

karthik