[Solved] App crashes when registration button is pressed
email and password should not be null or empty String email = mEmail.getText().toString(); String password = mPassword.getText().toString(); if(email.isEmpty() || password.isEmpty()) return; //you need to display message to the user mAuth.createUserWithEmailAndPassword(email, password) .addOnCompleteListener(CustomerLoginActivity.this, new OnCompleteListener<AuthResult>() { … }) solved App crashes when registration button is pressed