我以前一直在使用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 –