【问题标题】:Android Firebase Related Error in Authentication and RealTime Database [duplicate]身份验证和实时数据库中的 Android Firebase 相关错误 [重复]
【发布时间】:2019-03-09 20:24:52
【问题描述】:

我创建了两个活动RegisterSignin,但是当我运行我的代码时它崩溃并显示以下错误消息:

java.lang.RuntimeException:无法启动活动 ComponentInfo{com.example.firebasemessagingapp/com.example.firebasemessagingapp.LoginActivity}:java.lang.IllegalStateException:默认 FirebaseApp 未在此进程 com.example.firebasemessagingapp 中初始化。确保首先调用 FirebaseApp.initializeApp(Context)

【问题讨论】:

    标签: android firebase


    【解决方案1】:

    在你的 onCreate Of 活动中添加这一行

    FirebaseApp.initializeApp(Context) 
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-10-01
      • 2018-08-21
      • 1970-01-01
      • 1970-01-01
      • 2017-12-26
      • 1970-01-01
      • 2017-12-11
      • 2021-10-17
      相关资源
      最近更新 更多