FirebaseAuthListener introduces error when deploying

-1

problem when implementing the FirebaseAuthListener any suggestions?

    
asked by CHELUY 17.11.2017 в 04:55
source

1 answer

1

FirebaseAuth.AuthStateListener is an interface so you have to provide an implementation at the time of initialization.

Change:

FirebaseAuthStateListener = new FirebaseAuth.AuthStateListener();

By:

FirebaseAuthStateListener = new FirebaseAuth.AuthStateListener(){
  @Override
    public void onAuthStateChanged(@NonNull FirebaseAuth firebaseAuth) {
        FirebaseUser user = firebaseAuth.getCurrentUser();
        if (user != null) {
            // ...
        }
    }
};

And the second error is telling you that the resource R.id.Contraseña is a TextView in the XML but you are trying to convert it to EditText , something that will be impossible. Go to your XML and change it to <EditText /> .

    
answered by 17.11.2017 / 14:21
source