我成功使用旧版本的firebase auth ui,但在升级到最新版本后,我在尝试使用Google登录时收到以下错误:
E/AuthUI: A sign-in error occurred.
com.firebase.ui.auth.FirebaseUiException: Code: 10, message: 10:
at com.firebase.ui.auth.data.remote.GoogleSignInHandler.onActivityResult(GoogleSignInHandler.java:106)
at com.firebase.ui.auth.ui.idp.AuthMethodPickerActivity.onActivityResult(AuthMethodPickerActivity.java:225)
at android.app.Activity.dispatchActivityResult(Activity.java:7235)
at android.app.ActivityThread.deliverResults(ActivityThread.java:4320)
at android.app.ActivityThread.handleSendResult(ActivityThread.java:4367)
at android.app.ActivityThread.-wrap19(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1649)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6541)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)
Run Code Online (Sandbox Code Playgroud)
Facebook和电子邮件登录很好.
我在我的应用程序gradle中使用这些依赖项:
implementation 'com.google.android.gms:play-services-auth:15.0.1'
implementation 'com.firebaseui:firebase-ui-auth:4.0.0'
implementation 'com.google.firebase:firebase-auth:16.0.1'
implementation 'com.android.support:customtabs:27.1.1'
implementation 'com.android.support:cardview-v7:27.1.1'
implementation 'com.facebook.android:facebook-login:4.32.0'
implementation 'com.google.firebase:firebase-config:16.0.0'
implementation 'com.google.firebase:firebase-core:16.0.0'
implementation 'com.google.firebase:firebase-database:16.0.1'
Run Code Online (Sandbox Code Playgroud)
以下是我的项目级别:
classpath 'com.google.gms:google-services:4.0.1'
Run Code Online (Sandbox Code Playgroud)
登录活动:
public class ActivityLoginView extends ActivityBase {
// Misc
public static final int RC_SIGN_IN = 100; …Run Code Online (Sandbox Code Playgroud)