gpt4 book ai didi

android - 无法解析 GoogleSignIn 和 GoogleSignInClient

转载 作者:IT老高 更新时间:2023-10-28 23:04:07 31 4
gpt4 key购买 nike

我无法使用 GoogleSignIn(com.google.android.gms.auth.api.signin.GoogleSignIn) 和 GoogleSignInClient(com.google.android.gms.auth.api.signin.GoogleSignInClient) 在 Android Studio 中实现 Google Sign In 时,我可以访问 App 中的其他类,例如

com.google.android.gms.auth.api.signin.GoogleSignInAccount;
com.google.android.gms.auth.api.signin.GoogleSignInOptions;
com.google.android.gms.common.SignInButton;

我的 build.gradle(app) 文件的精简版本如下

android {

}

dependencies {

compile 'com.google.android.gms:play-services-auth:11.4.2'
compile('com.google.api-client:google-api-client-android:1.23.0') {
exclude group: 'org.apache.httpcomponents'
}
compile('com.google.apis:google-api-services-gmail:v1-rev72-1.23.0') {
exclude group: 'org.apache.httpcomponents'
}
implementation 'com.google.gms:google-services:3.1.2'
}

apply plugin: 'com.google.gms.google-services'

而我的 build.gradle(package) 是

buildscript {

dependencies {
classpath 'com.android.tools.build:gradle:3.0.0'
classpath 'com.google.gms:google-services:3.1.2'
}
}

任何帮助将不胜感激

最佳答案

将此添加到您的应用级依赖项

compile 'com.google.android.gms:play-services-auth:12.0.1'

关于android - 无法解析 GoogleSignIn 和 GoogleSignInClient,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47224177/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com