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和其他一些.

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

相关文章

Android性能优化——之控件的优化 前面讲了图像的优化,接下...
前言 上一篇已经讲了如何实现textView中粗字体效果,里面主要...
最近项目重构,涉及到了数据库和文件下载,发现GreenDao这个...
WebView加载页面的两种方式 一、加载网络页面 加载网络页面,...
给APP全局设置字体主要分为两个方面来介绍 一、给原生界面设...
前言 最近UI大牛出了一版新的效果图,按照IOS的效果做的,页...