所以,我有我AsyncTask
的如下:
private class AsyncRetriever extends AsyncTask<IotdHandler,Void,IotdHandler>{
ProgressDialog pDialog;
@Override
protected void onPreExecute(){
pDialog = new ProgressDialog(getApplicationContext());
pDialog.setMessage(getResources().getString(R.string.toast_msg1));
pDialog.show();
}
//------------------------------------------------------------------------------
这是MainActivity
. 但是,LogCat 标记pDialog.show()
为错误。
它说,Unable to start activity ComponentInfo.
我该如何解决这个问题?