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

前端之家收集整理的这篇文章主要介绍了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.f2er.com/android/311121.html

猜你在找的Android相关文章