The email address is badly formatted Firebase
Your code to set email
is incorrect. You are setting email
to the value of the EditText
for password
.
In method CheckLogin()
, change:
String email = mloginPassField.getText().toString().trim();
to:
String email = mLoginEmailField .getText().toString().trim();
Simply use Edittext named as Email and Password you need not do anything. the error comes up only if you use plaintext for both...
Remove whitespaces from email text it worked for me. by using trim()
method you can remove spaces.
I faced this problem recently, possible solutions are :
- Check the inputType of your EditText Field.
ADD this attribute to your EditText
android:inputType="textEmailAddress"
In Activity class, it should look like if u are using TextInputLayout instead of editText
mDisplayName=(TextInputLayout) findViewById(R.id.reg_name); mDisplayEmail=(TextInputLayout)findViewById(R.id.reg_email); mDisplayPassword=(TextInputLayout)findViewById(R.id.reg_password); String name = mDisplayName.getEditText().getText().toString(); String email = mDisplayEmail.getEditText().getText().toString(); String password = mDisplayPassword.getEditText().getText().toString();`