错误:无法找到com.google.gms:谷歌服务:1.0。加入谷歌服务插件,在build.gradle在机器人工作室的时候 [英] Error: Could not find com.google.gms:google-services:1.0. when adding google service plugin in build.gradle in android studio

查看:600
本文介绍了错误:无法找到com.google.gms:谷歌服务:1.0。加入谷歌服务插件,在build.gradle在机器人工作室的时候的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的Andr​​oid应用程序集成的OAuth登录使用Google+,按照教程的<一个href="https://developers.google.com/identity/sign-in/android/start-integrating">https://developers.google.com/identity/sign-in/android/start-integrating.

I am integrating OAuth login for Google+ on my android application, following the tutorial at https://developers.google.com/identity/sign-in/android/start-integrating.

据本教程中,我应该加入添加谷歌服务插件 类路径com.google.gms:谷歌服务:1.0 依赖于顶级 build.gradle 在我Android项目。

According to the tutorial, I should add the Google Service plugin by adding classpath 'com.google.gms:google-services:1.0' dependency to top-level build.gradle in my android project.

然而,当我与同步变化的摇篮,我看到了错误,如下所示:

However, when I sync the gradle with the changes, I see the error as follows:

错误:找不到com.google.gms:谷歌服务:1.0

Error:Could not find com.google.gms:google-services:1.0.

搜索在以下位置:       文件:/ C:/ Program Files文件/安卓/ Android的工作室/摇篮/ m2repository / COM /谷歌/ GMS /谷歌服务/ 1.0 /谷歌的服务,1.0.pom       文件:/ C:/ Program Files文件/安卓/ Android的工作室/摇篮/ m2repository / COM /谷歌/ GMS /谷歌服务/ 1.0 /谷歌服务-1.0.jar       <一href="https://jcenter.bintray.com/com/google/gms/google-services/1.0/google-services-1.0.pom">https://jcenter.bintray.com/com/google/gms/google-services/1.0/google-services-1.0.pom       <一href="https://jcenter.bintray.com/com/google/gms/google-services/1.0/google-services-1.0.jar">https://jcenter.bintray.com/com/google/gms/google-services/1.0/google-services-1.0.jar

Searched in the following locations: file:/C:/Program Files/Android/Android Studio/gradle/m2repository/com/google/gms/google-services/1.0/google-services-1.0.pom file:/C:/Program Files/Android/Android Studio/gradle/m2repository/com/google/gms/google-services/1.0/google-services-1.0.jar https://jcenter.bintray.com/com/google/gms/google-services/1.0/google-services-1.0.pom https://jcenter.bintray.com/com/google/gms/google-services/1.0/google-services-1.0.jar

在我的 build.gradle

// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:1.2.3'
        classpath 'com.google.gms:google-services:1.0'
    }
}

allprojects {
    repositories {
        jcenter()
    }
}

看来,机器人工作室是不是能够找到谷歌,服务插件存储库中。

It seems that the android studio is not able to find google-services plugin from repositories.

没有任何人有同样的问题?或者说,我失去了一些东西?

Does anybody have the same issue? Or, am I missing something?

任何投入将大大AP preciated!

Any input will be greatly appreciated!

最好的问候,

推荐答案

今天我碰到了同样的问题。在样品,他们使用这行来代替: 类路径com.google.gms:谷歌服务:1.3.0-β1 这工作。

I ran into the same issue today. In the samples they use this line instead: classpath 'com.google.gms:google-services:1.3.0-beta1' This works.

这篇关于错误:无法找到com.google.gms:谷歌服务:1.0。加入谷歌服务插件,在build.gradle在机器人工作室的时候的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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