我以前一直在使用Google Play,但在一个新项目中遇到了一个奇怪的问题。我使用SDK Manager下载了GP,并通过Project Structure/Dependencies添加了它,它自动在build.gradle依赖项中添加了一行。 但是当我做重建项目,它失败:无法找到Google Play版本
Error:A problem occurred configuring project ':app'.
> Could not resolve all dependencies for configuration ':app:_debugCompile'.
> Could not find any version that matches com.google.android.gms:play-services:+.
Searched in the following locations:
https://jcenter.bintray.com/com/google/android/gms/play-services/maven-metadata.xml
https://jcenter.bintray.com/com/google/android/gms/play-services/
https://repo1.maven.org/maven2/com/google/android/gms/play-services/maven-metadata.xml
https://repo1.maven.org/maven2/com/google/android/gms/play-services/
http://jzaccone.github.io/SlidingMenu-aar/com/google/android/gms/play-services/maven-metadata.xml
http://jzaccone.github.io/SlidingMenu-aar/com/google/android/gms/play-services/
https://oss.sonatype.org/content/repositories/snapshots/com/google/android/gms/play-services/maven-metadata.xml
https://oss.sonatype.org/content/repositories/snapshots/com/google/android/gms/play-services/
file:/Users/thatsme/android-sdks/extras/android/m2repository/com/google/android/gms/play-services/maven-metadata.xml
file:/Users/thatsme/android-sdks/extras/android/m2repository/com/google/android/gms/play-services/
file:/Users/thatsme/android-sdks/extras/google/m2repository/com/google/android/gms/play-services/maven-metadata.xml
file:/Users/thatsme/android-sdks/extras/google/m2repository/com/google/android/gms/play-services/
Required by:
GA:app:unspecified
千万不要使用'com.google.android.gms:玩-services'直接。分别使用它们,最新版本为“7.3.0”。 –
你是什么意思? – michaelsmith
表示您可以加载模块化服务,并请通知版本。检查:http://developer.android.com/google/play-services/setup.html –