Android Studio 3.0 Firebase [英] Android Studio 3.0 Firebase

查看:144
本文介绍了Android Studio 3.0 Firebase的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

直到昨天,我一直在使用Firebase身份验证,而Android Studio 2.3.3的编译SDK版本26.01却没有任何问题.

I have been using firebase authentication without any problem with compile SDK version 26.01 of Android Studio 2.3.3 until yesterday.

但是,由于我昨天更新到3.0,因此每次登录时,都会出现开发人员错误Toast,并且我的应用程序将异常终止.

However, since I updated to 3.0 yesterday, every time I sign-in, Developer error Toast will appear and my app will be terminated abnormally.

现在由于这个问题,我已经多次擦除并安装了Android Studio.

Now I have erased and installed Android studio several times because of this problem.

providers.add(new AuthUI.IdpConfig.Builder(AuthUI.GOOGLE_PROVIDER).build());

        startActivityForResult(
                AuthUI.getInstance()
                        .createSignInIntentBuilder()
                        .setIsSmartLockEnabled(false)
                        .setIsSmartLockEnabled(!BuildConfig.DEBUG)
                        .setLogo(R.drawable.logo_layer)
                        .setProviders(providers)
                        .setTheme(R.style.GreenTheme)
                        .build(),
                RC_SIGN_IN);

和此处的错误消息.

I/zygote: Rejecting re-init on previously-failed class java.lang.Class<com.firebase.ui.auth.provider.TwitterProvider>: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/twitter/sdk/android/core/Callback;


I/zygote: Caused by: java.lang.ClassNotFoundException: Didn't find class "com.twitter.sdk.android.core.Callback" on path: 

这些代码从2.3.3版本直到昨天都非常有效.但是,现在,这些错误消息出现并且根本不起作用.甚至我在Auth UI中仅使用了google provider.我根本没有使用Twitter-Provider.但是突然来了……我根本不知道为什么.

These codes really worked perfectly well from version 2.3.3 until yesterday. Now, however, these error messages appear and do not work at all. Even I have used only the google provider in the Auth UI. I did not use Twitter-Provider at all. but suddenly comes like this... I do not know why at all.

仿真器也已更改,如下所示. 而且我认为这似乎对Firebase身份验证中的问题也有重大影响.

And an emulator has been changed also just like below. And I think this also seems to have a significant impact on the problem, in Firebase Authentication.

推荐答案

我遇到了同样的错误,并且像您一样,我并未将Twitter指定为可用的登录提供程序之一.

I was getting the same error, and like you, I am not specifying Twitter as one of the available sign-in providers.

我能够通过将Twitter SDK库添加到应用程序依赖项中来消除错误:

I was able to eliminate the error by adding the Twitter SDK library to the app dependencies:

implementation ("com.twitter.sdk.android:twitter-core:3.0.0@aar") {
    transitive = true
}

这篇关于Android Studio 3.0 Firebase的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆