问题描述
我添加了一个登录活动我与Android的工作室但我遇到这些错误的应用程序:
错误:(11,37)错误:找不到符号类GooglePlayServicesClient
错误:(13,35)错误:找不到符号类PlusClient
错误:(20,44)错误:包GooglePlayServicesClient不存在
错误:(21,33)错误:包GooglePlayServicesClient不存在
错误:(35,13)错误:找不到符号类PlusClient
错误:(279,12)错误:找不到符号类PlusClient
错误:(78,31)错误:包PlusClient不存在
错误:(160,65)错误:包PlusClient不存在
错误:(239 5)错误:方法不覆盖或超类型实现方法
错误:(249,5)错误:方法不覆盖或超类型实现方法
错误:(262 5)错误:方法不覆盖或超类型实现方法
我已经在我的SDK管理器安装谷歌播放服务,所以我不知道为什么它告诉我的包不存在。
编辑:摇篮文件:
应用插件:com.android.application
安卓{
compileSdkVersion 22
buildToolsVersion22.0.1
defaultConfig {
的applicationIDcom.example.tyler.titanaid
的minSdkVersion 15
targetSdkVersion 22
版本code 1
VERSIONNAME1.0
}
buildTypes {
推出 {
minifyEnabled假
proguardFiles getDefaultProguardFile('ProGuard的-android.txt'),'proguard-rules.pro
}
}
}
依赖{
编译文件树(导演:库,包括:['的* .jar'])
编译com.android.support:appcompat-v7:22.0.0
编译com.google.android.gms:播放服务:7.0.0
}
嘿,我只是碰到了这个问题也。我没有发现太大的帮助,所以我做了很多的阅读和发现(https://developer.android.com/google/auth/api-client.html )在小记的GooglePlayServices API是德precated,每个人都必须迁移到GoogleApi代替。
我觉得Android的工作室一直没有更新,自动输入新的API,而不是旧的,后来在发展增加了登录活动时。
因此,任何依赖GooglePlayServices也必须更新,包括PlusClient和一帮他人。
我见过的迁移在互联网上的工具,但它可能只是使事情更容易做到这一点吧。希望这可以帮助。
I have added a login activity to my app with android studio however I am running into these errors:
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
I have already installed google play services in my SDK manager so I'm not sure why it's telling me the package doesn't exist.
EDIT:Gradle file:
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'
}
Hey I just ran into this problem also. I didn't find much help so I did a lot of reading and found ( https://developer.android.com/google/auth/api-client.html ) in a small note that the GooglePlayServices API is deprecated and everyone must migrate to GoogleApi instead.
I guess Android Studio has not been updated to automatically input the new API instead of the old one, when adding a login activity later in development.
So anything that relies on GooglePlayServices must also be updated, including PlusClient and a bunch of others.
I've seen migrating tools on the Internet but it might just make things easier to do it yourself. Hope this helps.
这篇关于错误:包GooglePlayServicesClient不存在的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!