android - 更新到 Google Play Services 8.3 后无法解析 GoogleApiClient

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

我正在开发一个依赖于 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;

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

最佳答案

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

关于android - 更新到 Google Play Services 8.3 后无法解析 GoogleApiClient,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33929165/

相关文章:

android - LruCache 返回 null

android - 像 Google IO 2014 应用程序中的 Activity 之间的平滑过渡

java - 如何从 Activity 中隐藏 Fragment - Android Studio

java - 如何删除 Android 应用程序上的默认应用程序导航标题?

android - 如何在 Linux mint 中更新 Android Studio?错误: Studio does not have write access to/app/extra. 请以特权用户运行更新

java - Gradle:具有不同源和目标兼容性的多项目

java - Gradle无法在Java项目中复制PNG文件

android - 无法在 Firebase 中注册

android - 添加 Android 设计支持库后,Gradle 构建速度非常慢

intellij-idea - Intellij/Android Studio 可以折叠注释吗?