【问题标题】:Cannot resolve GoogleApiClient after updating to Google Play Services 8.3更新到 Google Play Services 8.3 后无法解析 GoogleApiClient
【发布时间】:2015-11-26 01:22:14
【问题描述】:

我正在开发一个依赖于 Google Play 服务 8.1.0 的项目,并尝试更新到 8.3.0,详情如下:Setting Up Google Play Services

在同步我的 gradle 脚本并尝试构建后,我无法再解决来自 Google Play 服务的任何问题。这是我的构建脚本中的简单数字增量:

dependencies {
    //google play services components
    def playServicesVersion = '8.3.0'
    compile "com.google.android.gms:play-services-base:${playServicesVersion}"
    compile "com.google.android.gms:play-services-maps:${playServicesVersion}"
    compile "com.google.android.gms:play-services-gcm:${playServicesVersion}"
    ...

playServicesVersion 的数字设置为“8.1.0”时,我的项目构建良好。当切换到“8.3.0”时 - Google Play 服务中的任何内容都没有得到解决,即无法找到所有这些以及更多内容:

import com.google.android.gms.auth.api.Auth;
import com.google.android.gms.auth.api.credentials.Credential;
import com.google.android.gms.auth.api.credentials.CredentialRequest;

等等。我觉得我必须忽略一些简单的事情。

【问题讨论】:

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


    【解决方案1】:

    事实证明,我们正在扩展一些更改了它们的一些抽象方法签名的类,我的项目无法编译。当我应该关注编译消息而不是 Gradle 控制台时,我错误地关注了无法解析导入。更改覆盖的方法签名后编译成功。我怀疑其他人会遇到这种错误,请原谅我的新手错误......

    【讨论】:

      【解决方案2】:

      可能 8.1.0 已在您的 gradle 缓存中可用。

      更改为 8.3.0 需要下载,我之前注意到另一个问题,该问题指出 Google 下载站点出现 404 错误。

      Failed to fetch URL http://dl-ssl.google.com/android/repository/addons_list.xml 404 not found

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2018-03-07
        • 1970-01-01
        • 1970-01-01
        • 2015-05-15
        相关资源
        最近更新 更多