找不到com.google.android.gms:play-services:8.4.0 [英] Could not find com.google.android.gms:play-services:8.4.0
问题描述
我有一个Android项目,当运行./gradlew dependencies
命令时,出现以下错误,我无法弄清楚如何使用Google Play服务8.4.0. (8.3.0的作品)
I have Android project and when run ./gradlew dependencies
command, I get the following error and I cannot figure out how to use Google Play Service 8.4.0. (8.3.0 works)
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':app'.
> Could not resolve all dependencies for configuration ':app:_debugCompile'.
> Could not find com.google.android.gms:play-services:8.4.0.
Searched in the following locations:
https://jcenter.bintray.com/com/google/android/gms/play-services/8.4.0/play-services-8.4.0.pom
https://jcenter.bintray.com/com/google/android/gms/play-services/8.4.0/play-services-8.4.0.jar
https://maven.fabric.io/public/com/google/android/gms/play-services/8.4.0/play-services-8.4.0.pom
https://maven.fabric.io/public/com/google/android/gms/play-services/8.4.0/play-services-8.4.0.jar
https://zendesk.artifactoryonline.com/zendesk/repo/com/google/android/gms/play-services/8.4.0/play-services-8.4.0.pom
https://zendesk.artifactoryonline.com/zendesk/repo/com/google/android/gms/play-services/8.4.0/play-services-8.4.0.jar
https://repo1.maven.org/maven2/com/google/android/gms/play-services/8.4.0/play-services-8.4.0.pom
https://repo1.maven.org/maven2/com/google/android/gms/play-services/8.4.0/play-services-8.4.0.jar
file:/usr/local/android-sdk-linux/extras/android/m2repository/com/google/android/gms/play-services/8.4.0/play-services-8.4.0.pom
file:/usr/local/android-sdk-linux/extras/android/m2repository/com/google/android/gms/play-services/8.4.0/play-services-8.4.0.jar
file:/usr/local/android-sdk-linux/extras/google/m2repository/com/google/android/gms/play-services/8.4.0/play-services-8.4.0.pom
file:/usr/local/android-sdk-linux/extras/google/m2repository/com/google/android/gms/play-services/8.4.0/play-services-8.4.0.jar
这是应用gradle文件的外观.
Here is how the app gradle file looks like.
dependencies {
....
compile 'com.google.android.gms:play-services:8.4.0'
....
}
我尝试将以下内容放入项目gradle文件中,但没有帮助.
I have've tried to put the following in a project gradle file but didn't work help.
dependencies {
classpath 'com.android.tools.build:gradle:2.0.0-alpha3'
classpath 'com.google.gms:google-services:2.0.0-alpha3'
}
有人可以帮我进一步调试吗?
Could anyone help me to debug further?
推荐答案
配置项目':app'时出现问题.
A problem occurred configuring project ':app'.
无法解析配置':app:_debugCompile'的所有依赖项. 找不到com.google.android.gms:play-services:8.4.0.
Could not resolve all dependencies for configuration ':app:_debugCompile'. Could not find com.google.android.gms:play-services:8.4.0.
发布总计build.gradle
- 使用最新版本的构建工具
- 然后调用类路径
'com.android.tools.build:gradle:2.0.0-alpha3'
- Use Latest versions of build tools
- Then call classpath
'com.android.tools.build:gradle:2.0.0-alpha3'
最后
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
defaultConfig {
applicationId ""
minSdkVersion 17
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
检查 版本冲突更新为8.4.0
Check Version conflict updating to 8.4.0
这篇关于找不到com.google.android.gms:play-services:8.4.0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!