Firebases Android教程中的我的FriendlyChat应用程序在包含Firebase UI和Firebase身份验证后一直崩溃

时间:2019-05-25 18:05:12

标签: firebase-authentication firebaseui

我正在做Firebase的“在周末构建应用程序”教程。本教程的想法是构建此FriendlyChat应用并通过Firebase实时数据库,Firebase身份验证等。 Firebase已经定义了此“登录/登录” UI模板FirebaseUI。自从我将它附加到应用程序后,它一直崩溃。

我已经多次开始本教程,并且总是可以得出这一点。

我不断收到此错误:

2019-05-25 20:48:41.287 24968-24968/com.google.firebase.udacity.friendlychat E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.google.firebase.udacity.friendlychat, PID: 24968
    java.lang.RuntimeException: Unable to start activity ComponentInfo{com.google.firebase.udacity.friendlychat/com.google.firebase.udacity.friendlychat.MainActivity}: java.util.concurrent.RejectedExecutionException: Task java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask@263ac6a rejected from com.google.firebase.database.core.utilities.DefaultRunLoop$1@6f4e55b[Terminated, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 1]
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3120)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3263)
        at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)
        at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
        at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1960)
        at android.os.Handler.dispatchMessage(Handler.java:106)
        at android.os.Looper.loop(Looper.java:214)
        at android.app.ActivityThread.main(ActivityThread.java:7076)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:494)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:965)
     Caused by: java.util.concurrent.RejectedExecutionException: Task java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask@263ac6a rejected from com.google.firebase.database.core.utilities.DefaultRunLoop$1@6f4e55b[Terminated, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 1]
        at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:2085)
        at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:848)
        at java.util.concurrent.ScheduledThreadPoolExecutor.delayedExecute(ScheduledThreadPoolExecutor.java:334)
        at java.util.concurrent.ScheduledThreadPoolExecutor.schedule(ScheduledThreadPoolExecutor.java:562)
        at java.util.concurrent.ScheduledThreadPoolExecutor.execute(ScheduledThreadPoolExecutor.java:654)
        at com.google.firebase.database.core.utilities.DefaultRunLoop.scheduleNow(com.google.firebase:firebase-database@@16.1.0:105)
        at com.google.firebase.database.core.Repo.scheduleNow(com.google.firebase:firebase-database@@16.1.0:276)
        at com.google.firebase.database.Query.addEventRegistration(com.google.firebase:firebase-database@@16.1.0:233)
        at com.google.firebase.database.Query.addChildEventListener(com.google.firebase:firebase-database@@16.1.0:163)
        at com.google.firebase.udacity.friendlychat.MainActivity.onCreate(MainActivity.java:173)
        at android.app.Activity.performCreate(Activity.java:7340)
        at android.app.Activity.performCreate(Activity.java:7331)
        at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1275)
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3100)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3263) 
        at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78) 
        at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108) 
        at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68) 
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1960) 
        at android.os.Handler.dispatchMessage(Handler.java:106) 
        at android.os.Looper.loop(Looper.java:214) 
        at android.app.ActivityThread.main(ActivityThread.java:7076) 
        at java.lang.reflect.Method.invoke(Native Method) 
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:494) 
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:965) 

打开该应用程序应该会让我进入“登录”页面,但它立即崩溃。抱歉,我写的主题很不专业,但这是我的第一篇文章。

0 个答案:

没有答案