Gradle无法解析Play服务依赖项

Ran*_* Ma 32 android gradle android-studio

我有一个干净的Android项目与谷歌播放服务转.13通过SDK管理器安装,遵循这些说明.

我的build.gradle文件如下:

dependencies {
    compile 'com.google.android.gms:play-services:4.0.30'
}
Run Code Online (Sandbox Code Playgroud)

但是,当我尝试构建这个应用程序时,我明白了

Gradle: A problem occurred configuring project ':Maple'.
> Failed to notify project evaluation listener.
   > Could not resolve all dependencies for configuration ':Maple:_DebugCompile'.
      > Could not find com.google.android.gms:play-services:4.0.30.
        Required by:
            MapleProject:Maple:unspecified
Run Code Online (Sandbox Code Playgroud)

Ran*_* Ma 91

在SDK管理器中安装Google Repository.

  • +1为什么GCM指南/文档中没有这个?我的生命浪费了3个小时. (16认同)
  • 我安装了这个,但它仍然无法正常工作. (2认同)