接入google+登录SDK提示google-services.json is missing

接入google+登录SDK时下载官方的demo,然后一堆问题,于是把该安装的最新的库都安装了。
但仍然有如下错误。

Information:Gradle tasks [:app:generateDebugSources, :app:mockableAndroidJar, :app:prepareDebugUnitTestDependencies, :app:generateDebugAndroidTestSources]
Warning:WARNING: Dependency org.apache.httpcomponents:httpclient:4.0.1 is ignored for debug as it may be conflicting with the internal version provided by Android.
Warning:WARNING: Dependency org.apache.httpcomponents:httpclient:4.0.1 is ignored for release as it may be conflicting with the internal version provided by Android.
Error:Execution failed for task ':app:processDebugGoogleServices'.
> File google-services.json is missing. The Google Services Plugin cannot function without it. 
   Searched Location: 
  C:\Users\Administrator\Downloads\google-services-master\android\signin\app\src\debug\google-services.json
  C:\Users\Administrator\Downloads\google-services-master\android\signin\app\google-services.json
Information:BUILD FAILED
Information:Total time: 1.244 secs
Information:1 error
Information:2 warnings
Information:See complete output in console

也就是说找不到这个文件 File google-services.json is missing。
这种问题可不好解决,鬼知道这个google-services.json是个什么鬼。

在Stack Overflow搜到一哥们的一句话。
You should delete a line apply plugin: ‘com.google.gms.google-services’
because “com.android.application” package already has same package.

看了一下build.gradle文件确实有如下两句:

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

也就是说com.android.application已经包含com.google.gms.google-services这个包了。因为重复引入所以找不到吧。(MD为什么不提示重复而提示找不到?)

  • 2
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 4
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值