微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

android – 错误:软件包GooglePlayServicesClient不存在

我已经添加一个登录活动到我的应用程序与 android工作室,但我遇到这些错误
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服务,所以我不知道为什么告诉我包不存在.

编辑:
毕业文件

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而不是旧API.
所以依赖于GooglePlayServices的任何东西也必须更新,包括PlusClient和其他一些.

我已经看到在互联网上移植工具,但它可能只是使事情更容易自己做.希望这可以帮助.

原文地址:https://www.jb51.cc/android/311121.html

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐