我对android编程有点陌生,似乎无法摆脱这个错误..
它告诉我:
The type LoginForm.login must implement the inherited abstract method AsyncTask<String,Void,String>.doInBackground(String...)
这是代码:
private class login extends AsyncTask<String, Void, String> {
protected String doInBackground(String url) {
String response = "";
DefaultHttpClient client = new DefaultHttpClient();
HttpGet httpGet = new HttpGet(url);
try {
HttpResponse execute = client.execute(httpGet);
InputStream content = execute.getEntity().getContent();
BufferedReader buffer = new BufferedReader(new InputStreamReader(content));
String s = "";
while ((s = buffer.readLine()) != null) {
response += s;
}
} catch (Exception e) {
e.printStackTrace();
}
return response;
}
@Override
protected void onPostExecute(String result) {
int mId = 0;
//Close loading bar and text
login_form_loader.setVisibility(View.INVISIBLE);
warning.setText(result);
}
}
这到底是什么意思,我该如何解决这个问题?