找不到com.google.gms:google-services:9.0,0 [英] Could not find com.google.gms:google-services:9.0,0

查看:156
本文介绍了找不到com.google.gms:google-services:9.0,0的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尝试添加Google Play服务的依赖关系时,Sync失败。问题似乎是它在C:/ Program / Files / Android / Android Studio中寻找jar,但是我的SDK被放置在C:\Android\sdk中。然而,我还在Program Files中安装了Android Studio,其中没有Google Play服务的jar。



信息:Gradle任务[clean::app:generateDebugSources,:app:compileDebugSources ]
错误:配置根项目'XXXXXX'时出现问题。


$ b


无法解析配置的所有依赖关系:classpath' 。
找不到com.google.gms:google-services:9.0.0。
在以下位置搜索:
file:/ C:/ Program Files / Android / Android Studio / gradle / m2repository / com / google / gms / google-services / 9.0.0 / google-services- 9.0.0.pom
文件:/ C:/ Program Files / Android / Android Studio / gradle / m2repository / com / google / gms / google-services / 9.0.0 / google-services-9.0.0.jar
https ://jcenter.bintray.com/com/google/gms/google-services/9.0.0/google-services-9.0.0.pom
https://jcenter.bintray.com/com/google/gms /google-services/9.0.0/google-services-9.0.0.jar
要求:
:XXXXX:未指定
信息:BUILD FAILED
信息:总时间:6.148秒
信息:1个错误
信息:0个警告
信息on:查看控制台中的完整输出


另外,我的ANDROID_HOME设置为C:\Android\sdk。
请指教。

解决方案

通过检查其他 SO question 。您可以发现Google Play服务更新至版本9.0.0存在错误问题。



一些解决方案是检查您是否为Gradle启用了离线工作,取消选中Offline Work如果它被检查。然后,确认是否在项目级别 build.gradle:classpath'com.google.gms:google-services:3.0.0'中提到了作为依赖关系提及的最新版Google服务。在gradle同步完成后清理和构建项目。



另外,有些人通过删除 debug.keystore

检查此 SO问题获取更多信息。


The Sync failed when tried to add the dependency for google play service. The problem seem to its looking for the jar in C:/Program/Files/Android/Android Studio however my SDK is placed in C:\Android\sdk. However I also have Android Studio in Program Files where there are no jar for Google play services.

Information:Gradle tasks [clean, :app:generateDebugSources, :app:compileDebugSources] Error:A problem occurred configuring root project 'XXXXXX'.

Could not resolve all dependencies for configuration ':classpath'. Could not find com.google.gms:google-services:9.0.0. Searched in the following locations: file:/C:/Program Files/Android/Android Studio/gradle/m2repository/com/google/gms/google-services/9.0.0/google-services-9.0.0.pom file:/C:/Program Files/Android/Android Studio/gradle/m2repository/com/google/gms/google-services/9.0.0/google-services-9.0.0.jar https://jcenter.bintray.com/com/google/gms/google-services/9.0.0/google-services-9.0.0.pom https://jcenter.bintray.com/com/google/gms/google-services/9.0.0/google-services-9.0.0.jar Required by: :XXXXX:unspecified Information:BUILD FAILED Information:Total time: 6.148 secs Information:1 error Information:0 warnings Information:See complete output in console

Also my ANDROID_HOME is set to C:\Android\sdk. Please advise.

解决方案

By checking other SO question. You can find that Google Play Service updating to version 9.0.0 has a bug issue.

Some solution is by checking if you have enabled offline work for gradle, deselect Offline Work if it's checked. Then, confirm if you have latest version of Google services mentioned as dependencies in project level build.gradle: classpath 'com.google.gms:google-services:3.0.0'. Clean and build the project after the gradle sync completes.

Also, some people fixed it by just deleting the debug.keystore file found in the android folder.

Check this SO question for more information.

这篇关于找不到com.google.gms:google-services:9.0,0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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