gpt4 book ai didi

android - 找不到 com.google.android.gms :play-services:8. 4.0

转载 作者:塔克拉玛干 更新时间:2023-11-02 21:55:05 24 4
gpt4 key购买 nike

我有 Android 项目,当运行 ./gradlew dependencies 命令时,出现以下错误,我不知道如何使用 Google Play Service 8.4.0。 (8.3.0 有效)

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 文件的样子。

  dependencies {
....
compile 'com.google.android.gms:play-services:8.4.0'
....
}

我曾尝试将以下内容放入项目 gradle 文件中,但没有成功。

    dependencies {
classpath 'com.android.tools.build:gradle:2.0.0-alpha3'
classpath 'com.google.gms:google-services:2.0.0-alpha3'
}

谁能帮我进一步调试?

最佳答案

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.

发布你的总build.gradle

  1. 使用最新版本的构建工具
  2. 然后调用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"
}

检查 Version conflict updating to 8.4.0

关于android - 找不到 com.google.android.gms :play-services:8. 4.0,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35124863/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com