gpt4 book ai didi

android - 错误 : Package GooglePlayServicesClient does not exist

转载 作者:塔克拉玛干 更新时间:2023-11-02 07:57:36 25 4
gpt4 key购买 nike

我已经使用 android studio 向我的应用程序添加了一个登录 Activity ,但是我遇到了这些错误:

Error:(11, 37) error: cannot find symbol class GooglePlayServicesClient

Error:(13, 35) error: cannot find symbol class PlusClient

Error:(20, 44) error: package GooglePlayServicesClient does not exist

Error:(21, 33) error: package GooglePlayServicesClient does not exist

Error:(35, 13) error: cannot find symbol class PlusClient

Error:(279, 12) error: cannot find symbol class PlusClient

Error:(78, 31) error: package PlusClient does not exist

Error:(160, 65) error: package PlusClient does not exist

Error:(239, 5) error: method does not override or implement a method from a supertype

Error:(249, 5) error: method does not override or implement a method from a supertype

Error:(262, 5) error: method does not override or implement a method from a supertype

我已经在我的 SDK 管理器中安装了 google play 服务,所以我不确定为什么它告诉我该包不存在。

编辑: Gradle 文件:

apply plugin: 'com.android.application'

android {
compileSdkVersion 22
buildToolsVersion "22.0.1"

defaultConfig {
applicationId "com.example.tyler.titanaid"
minSdkVersion 15
targetSdkVersion 22
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:22.0.0'
compile 'com.google.android.gms:play-services:7.0.0'
}

最佳答案

嘿,我也遇到了这个问题。我没有找到太多帮助,所以我做了很多阅读并在一个小注释中发现 ( https://developer.android.com/google/auth/api-client.html ) GooglePlayServices API 已被弃用,每个人都必须迁移到 GoogleApi。

Note: If you have an existing app that connects to Google Play services with a subclass of GooglePlayServicesClient, you should migrate to GoogleApiClient as soon as possible.

我猜 Android Studio 还没有更新到自动输入新的 API 而不是旧的,在开发后期添加登录 Activity 时。
因此,任何依赖于 GooglePlayServices 的东西都必须更新,包括 PlusClient 和其他一些东西。

我在 Internet 上看到过迁移工具,但它可能只会让您自己做起来更容易。希望这可以帮助。

关于android - 错误 : Package GooglePlayServicesClient does not exist,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29310201/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com