Get E-Mail Address from Layout do not work [duplicate]

Problem is that you are taking the reference to the view instead, you should do like this

val emailField = findViewById(R.id.editTextEmailAddress)

val passwordField = findViewById(R.id.editTextPassword)

Now access the text

val email = emailField.text.toString()

val password = passwordField.text.toString()