will add some points to what @user370305 Said,
You can not touch UI Elements in non-ui thread.
If you are using AsyncTask doInBackground is executed in non-ui thread so you can't access ImageView in that .
You can access UI elements in onPreExecute,onProgressUpdate & onPostExcecute.