通过gradle引用播放服务停止为我工作 - 煮沸 - 甚至我作为参考的样本首先停止工作:https: //plus.google.com/+AndroidDevelopers/posts/4Yhpn6p9icf
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':auth'.
> Failed to notify project evaluation listener.
> Could not resolve all dependencies for configuration ':auth:compile'.
> Could not find com.google.android.gms:play-services:3.1.36.
Required by:
gpsdemos:auth:unspecified
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 3.577 secs
Run Code Online (Sandbox Code Playgroud)
我担心只是版本增加了但提出了两个问题:#1)新版本是什么?#2)为什么旧版本消失了?
我正在尝试更新使用GMS库的旧项目.但是,Gradle同步无法刷新项目,从而给出标题中提到的错误.
这就是build.gradle的样子:
project(":android") {
apply plugin: "android"
apply plugin: 'com.android.application'
configurations { natives }
dependencies {
compile project(":core")
compile "com.badlogicgames.gdx:gdx-backend-android:$gdxVersion"
natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-armeabi"
natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-armeabi-v7a"
natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-x86"
compile "com.google.android.gms:play-services:7.0.0"
}
}
Run Code Online (Sandbox Code Playgroud)
错误是:
Error:Could not find com.google.android.gms:play-services:7.0.0.
Searched in the following locations:
file:/C:/Users/Harri/.m2/repository/com/google/android/gms/play-services/7.0.0/play-services-7.0.0.pom
file:/C:/Users/Harri/.m2/repository/com/google/android/gms/play-services/7.0.0/play-services-7.0.0.jar
https://repo1.maven.org/maven2/com/google/android/gms/play-services/7.0.0/play-services-7.0.0.pom
https://repo1.maven.org/maven2/com/google/android/gms/play-services/7.0.0/play-services-7.0.0.jar
https://oss.sonatype.org/content/repositories/snapshots/com/google/android/gms/play-services/7.0.0/play-services-7.0.0.pom
https://oss.sonatype.org/content/repositories/snapshots/com/google/android/gms/play-services/7.0.0/play-services-7.0.0.jar
https://oss.sonatype.org/content/repositories/releases/com/google/android/gms/play-services/7.0.0/play-services-7.0.0.pom
https://oss.sonatype.org/content/repositories/releases/com/google/android/gms/play-services/7.0.0/play-services-7.0.0.jar
Required by:
CarGame-refresh:android:1.2
Run Code Online (Sandbox Code Playgroud)
我已经在SDK管理器中安装并更新了所有必需的东西:

应该注意的是,这个项目最初是一个Eclipse项目,我刚刚导入Android Studio.
编辑:似乎Gradle看起来不是GMS的正确目录.但它安装在SDK路径中.看来这里的问题与这个未解决的问题非常相似.