Android 错误:找不到符号类GoogleAccountCredential

Android 错误:找不到符号类GoogleAccountCredential,android,google-app-engine,google-play-services,build.gradle,google-api-java-client,Android,Google App Engine,Google Play Services,Build.gradle,Google Api Java Client,由Android构建失败,出现以下错误- Error:(23, 68) error: package com.google.api.client.googleapis.extensions.android.gms.auth does not exist Error:(60, 20) error: cannot find symbol class GoogleAccountCredential Error:(79, 19) error: cannot find symbol class Googl

由Android构建失败,出现以下错误-

Error:(23, 68) error: package com.google.api.client.googleapis.extensions.android.gms.auth does not exist
Error:(60, 20) error: cannot find symbol class GoogleAccountCredential
Error:(79, 19) error: cannot find symbol class GoogleAccountCredential
Error:(218, 22) error: cannot find symbol variable GoogleAccountCredential
Error:Execution failed for task ':app:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.
我不知道这个类属于哪个库。包裹是

com.google.api.client.googleapis.extensions.android.gms.authc.GoogleAccountCredential

我已尝试在构建依赖项中添加所有库。现在看起来像是这样-

dependencies {

compile 'com.google.android.gms:play-services-plus:9.0.2'
compile 'com.google.android.gms:play-services-ads:9.0.2'
compile 'com.google.android.gms:play-services-gcm:9.0.2'
compile 'com.google.android.gms:play-services-maps:9.0.2'
compile 'com.google.android.gms:play-services-auth:9.0.2'
compile 'com.google.android.gms:play-services-base:9.0.2'
compile 'com.google.android.gms:play-services-identity:9.0.2'

compile 'com.google.api-client:google-api-client:1.23.0'


compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:23.0.1'
compile 'com.google.code.gson:gson:2.4'

// V2: Endpoints Framework v2 migration
endpointsServer project(path: ':DeviceLocatorBackend', configuration: 'endpoints')
compile 'com.google.api-client:google-api-client:+'
compile 'com.google.http-client:google-http-client-android:1.22.0'
}

必须添加以下依赖项才能使其正常工作-

compile 'com.google.api-client:google-api-client-android:1.20.0'

必须添加以下依赖项才能使其正常工作-

compile 'com.google.api-client:google-api-client-android:1.20.0'

播放服务9.0.2版?您为什么不使用最新版本?我想我需要添加存储库源代码。我无法获取最新版本。但这不是我现在的问题。我对旧版本的库没意见,只要没有任何问题。它应该是GoogleAPI客户端库的一部分,您已经添加了它。您是否包含mavenCentral?没有,我有jcenter,但依赖关系得到了正确解决。嗯。。您已经在下面再次添加了依赖项:compile'com.google.api client:google api client:+'这一行不应该是必需的,因为您之前已经添加了它。但是,这可能无法解决您的问题。播放服务9.0.2版?您为什么不使用最新版本?我想我需要添加存储库源代码。我无法获取最新版本。但这不是我现在的问题。我对旧版本的库没意见,只要没有任何问题。它应该是GoogleAPI客户端库的一部分,您已经添加了它。您是否包含mavenCentral?没有,我有jcenter,但依赖关系得到了正确解决。嗯。。您已经在下面再次添加了依赖项:compile'com.google.api client:google api client:+'这一行不应该是必需的,因为您之前已经添加了它。但是,这可能无法解决您的问题。。