我正在尝试使用AsyncTask,但是我的doInBackground和onPostExecute方法都给了我同样的错误,说Method does not override method from its superclass
。我的代码是:
public class SigninActivity extends AsyncTask{
private TextView status, result;
private Context context;
private int flag = 0;
public SigninActivity(Context context, TextView status, TextView result, int flag) {
this.context = context;
this.statusField = status;
this.roleField = result;
this.flag = flag;
}
protected void onPreExecute() {
}
@Override
protected String doInBackground(String... arg0) {
//Code
}
@Override
protected void onPostExecute(String result) {
//Code
}