我正在使用Firebase Android SDK v.9.0.2,目前无法完成注册。我正在添加身份验证状态侦听器,并在成功注册后将其删除。但是它被调用多次。这是我在日志中得到的内容:
D/FirebaseAuth: Notifying listeners about a sign-out event.
D/FirebaseApp: Notifying auth state listeners.
D/FirebaseApp: Notified 0 auth state listeners.
D/ActivityRegister: auth listener called
D/FirebaseAuth: Notifying listeners about user ( bwVX8jBbZvYcIj28hYsGZCcbzxi1 ).
D/FirebaseApp: Notifying auth state listeners.
D/FirebaseApp: Notified 0 auth state listeners.
D/ActivityRegister: auth listener called
D/FirebaseAuth: Notifying listeners about user ( bwVX8jBbZvYcIj28hYsGZCcbzxi1 ).
D/FirebaseApp: Notifying auth state listeners.
D/FirebaseApp: Notified 1 auth state listeners.
"D/ActivityRegister: auth listener called" 日志信息在监听器内部。可以看到,当 Firebase 通知0个监听器时,实际上它被调用了。而当它显示1个监听器时,监听器根本不会被调用。 有没有解决这个问题的方法?