【问题标题】:Android Studio: Could not find any version that matches com.google.gms:play-services:6.1.+Android Studio:找不到任何与 com.google.gms:play-services:6.1.+ 匹配的版本
【发布时间】:2014-12-05 11:54:30
【问题描述】:

我最近更新了我的 android studio,当我尝试同步我的 gradle 文件时,我收到以下错误:

Could not find any version that matches com.google.gms:play-services:6.1.+

我知道 Android Studio 附带它自己的 sdk,所以我安装了 ADT sdk 并将我的项目指向这个,但我仍然遇到同样的错误,这是我的 gradle 依赖项:

dependencies {
    compile 'com.android.support:appcompat-v7:20.+'
    compile 'com.path:android-priority-jobqueue:1.1.2'
    compile files('libs/Parse-1.4.2.jar')
    compile project(':ws_wrapper')
    compile project(':custom_slider_library')
    compile 'com.crashlytics.android:crashlytics:1.+'
    compile 'com.google.android.gms:play-services:6.1.+'
    compile project(':shinobicharts-android-library')
    compile files('libs/shinobicharts-android-trial-1.3.5.jar')
    compile files('libs/androidplot-core-0.6.1-SNAPSHOT.jar')
    compile files('libs/activation.jar')
    compile files('libs/additionnal.jar')
    compile files('libs/mail.jar')
    compile files('libs/universal-image-loader-1.9.2.jar')
    compile files('libs/twitter4j-core-4.0.1.jar')
}

我不确定下一步该做什么,我的 sdk 管理器是最新的,有人有什么想法吗?由于这个问题,我目前无法运行它。
如果我尝试通过项目结构添加依赖项,则 maven 下拉列表中不提供 google play 服务。

只需在清单中添加这一行 @integer/google_play_services_version 也会导致它说无法解析符号的问题

【问题讨论】:

    标签: android maven gradle android-studio google-play-services


    【解决方案1】:

    您的 SDK 实际上不是最新的。您需要安装 Google Repository 的第 12 版;那就是发布 Google Play Services 6.1.11 的那个。

    【讨论】:

    • 我遇到了同样的问题,并确认我拥有 Google Repository 的第 12 版以及 Google Play 服务的第 20 版
    • @MeanderingCode 你解决了你的问题吗?我有同样的问题。
    • 在这些情况下,您可能需要发布一个新问题并包含您的确切错误消息以及您在 Gradle 脚本中获得的内容。
    • @savepopulation 我有。在我的情况下,我需要在我的repositories{} 块中添加一个额外的maven{} 块,其中包含指向我的build.gradle 文件中google 特定本地maven 存储库的路径。 (更详细的大纲不适合发表评论)
    • @MeanderingCode 这听起来很奇怪。我认为您的配置一定有问题,因为您不需要这样做。
    猜你喜欢
    • 2016-04-21
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-11-10
    • 2018-09-07
    • 1970-01-01
    相关资源
    最近更新 更多