没有google-services.json,Google服务插件将无法运行 [英] Google Services Plugin cannot function without google-services.json

查看:475
本文介绍了没有google-services.json,Google服务插件将无法运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

文件google-services.json丢失. Google服务插件无法运行

File google-services.json is missing. The Google Services Plugin cannot function

由于我从项目中删除了google-services.json文件,因此收到此错误代码.现在解决此问题的明显方法是再次添加它,但是我有理由删除它.

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.

"注意:如果仅在以下情况下启用Google登录,您生成了配置文件,则可以跳过此步骤.Google登录不需要将配置文件包含在您的项目中-生成该文件将执行必要的配置步骤.-这是其中的正式说明文档,并且由于我仅启用了Google登录,所以看不到出现此错误消息的原因.有没有人也遇到过这个问题并解决了这个问题,因为我认为我正确实施了所有事情.

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

注意:它与包含的项目中的文件配合使用.

编辑:为澄清起见,我的应用程序可以正常运行,并且没有问题,但是我想知道为什么我不能删除google-services.json文件,尽管我可以没问题!

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!

推荐答案

在应用级build.gradle中添加apply plugin: 'com.google.gms.google-services'时,它将解析google-services.json文件中的配置信息.

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.

您删除了google-services.json文件,这就是为什么它无法解析
的原因,因此也从触发解析以使其再次起作用的应用级build.gradle中删除以下行.

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'

这篇关于没有google-services.json,Google服务插件将无法运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆