无法用“google-play-services”

时间:2015-09-10 17:41:02

标签: android gradle mixpanel

我正在尝试将MixPanel整合到我的Android应用程序中,它还需要google-play-services。我在 build.gradle

中添加了以下几行
compile 'com.mixpanel.android:mixpanel-android:4.6.4'
compile 'com.google.android.gms:play-services:7.8.0'

运行 $ gradle build --daemon

时出现以下错误
* What went wrong:
A problem occurred configuring root project 'git'.
> Could not resolve all dependencies for configuration ':_debugCompile'.
   > Could not find com.google.android.gms:play-services:7.8.0.
     Searched in the following locations:
         http://dl.bintray.com/glomadrian/maven/com/google/android/gms/play-services/7.8.0/play-services-7.8.0.pom
         http://dl.bintray.com/glomadrian/maven/com/google/android/gms/play-services/7.8.0/play-services-7.8.0.jar
         https://jcenter.bintray.com/com/google/android/gms/play-services/7.8.0/play-services-7.8.0.pom
         https://jcenter.bintray.com/com/google/android/gms/play-services/7.8.0/play-services-7.8.0.jar
         file:/home/prakash/Programming/Android/android-sdk-linux/extras/android/m2repository/com/google/android/gms/play-services/7.8.0/play-services-7.8.0.pom
         file:/home/prakash/Programming/Android/android-sdk-linux/extras/android/m2repository/com/google/android/gms/play-services/7.8.0/play-services-7.8.0.jar
     Required by:
         :git:unspecified

* Try:
Run with --stacktrace option to get the stack trace. Run with --debug option to get more log output.

BUILD FAILED

知道问题是什么吗?

2 个答案:

答案 0 :(得分:1)

我需要做的就是安装

Google Play Services
Google Respository

通过我的** Android SDK Manager“

感谢@mateus @invariant @gabriele

答案 1 :(得分:0)

您几乎从不需要所有播放服务API。 查看此列表并编译您真正需要的内容。 Google Play Services APIs