我通过Android应用程序登录谷歌播放时遇到问题,我补充说:编译'com.google.firebase:firebase-auth:11.4.2'并在我的gradle依赖项中编译'com.google.android.gms:play-services-auth:11.4.2' .
我只有类似:GoogleSignInApi或GoogleSignInAccount,我不知道如何导入其他人 .
我的意思是像GoogleSignIn或GoogleSignInClient这样的课程 . 我只是在图书馆看不到它们 .
3 回答
GoogleSignIn
/GoogleSignInClient
在 Google Play services SDK version 11.6 中介绍 .旧版本的类名略有不同,需要使用GoogleApiClient .
请从Android Studio升级到11.6并配置以下依赖项 .
这是版本
11.6.0
的release noteIn Auth Library :
添加了GoogleSignInClient和GoogleSignIn类 . GoogleSignInClient提供了与Google Sign In API交互的入口点 .
所以注入
11.6.0
版本的auth工件 .compile
现已弃用,所以最好使用implementation
从SDK manager-> Extra将PlayStore lib更新到最新版本46
将所有firebase依赖项更新为1160
allprojects {
存储库{
jcenter()
mavenCentral()
maven {url“https://maven.google.com”}
}
}