error: incompatible types: EditText cannot be converted to String auth.createUserWithEmailAndPassword(email,password).addOnCompleteListener(CreateActivity.this,new OnCompleteListener<AuthResult>() code example

Example: error: incompatible types: EditText cannot be converted to String auth.createUserWithEmailAndPassword(email,password).addOnCompleteListener(CreateActivity.this,new OnCompleteListener()

//Adding Getters

private void createUser(String text_email, String text_password) {
		//add email.getText().toString()
    auth.createUserWithEmailAndPassword(email.getText().toString(),password.getText().toString()).addOnCompleteListener(CreateActivity.this,new OnCompleteListener<AuthResult>()

Tags:

Java Example