So, I have my AsyncTask as below:  
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();
        }
//------------------------------------------------------------------------------  
This is an inner class of the MainActivity. However, LogCat flags pDialog.show() as an error.
It says, Unable to start activity ComponentInfo. 
How do I solve this?
 
     
    