You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi. I'm doing a Android Studio Project, with some AsyncTasks, and at some point it gives me the error at the Title. I know that i really can't use method getText it in doInBackground, but i've tried to do the recommended changes from another questions, to the code and nothing seems to work. This is my code:
`public class LoginActivity extends AppCompatActivity {
public class LoadAsyncTaskLogin extends AsyncTask<String, Void, User> {
@Override
protected User doInBackground(Strings... params) {
String email = params[0]; //edtEmail.getText().toString();
String password = params[1]; //edtPassword.getText().toString();
User user2 = new User();
user2 = database.getUserDao().getUser(email,password);
return user2;
}
Dont try to access edtEmail.getText().toString() in doInBackground()
doInBackground() this method is execute on worker thread not on main thread so we cannot access view inside this
Hi. I'm doing a Android Studio Project, with some AsyncTasks, and at some point it gives me the error at the Title. I know that i really can't use method getText it in doInBackground, but i've tried to do the recommended changes from another questions, to the code and nothing seems to work. This is my code:
`public class LoginActivity extends AppCompatActivity {
The error is on "doInBackground". What changes do i have to do?
The text was updated successfully, but these errors were encountered: