aSyncTask not working correctly

view story

http://stackoverflow.com – In a aSyncTask, i get an error, but i don't know how to fix this. The error is on the line with grid.setAdapter(adapter). Here is the onPostExecute(): protected void onPostExecute(String result){ // dismiss dialog pDialog.dismiss(); // Add adapter to the list ViewAlbumAdapter adapter = new ViewAlbumAdapter(ViewAlbum.this, itemList); GridView grid = (GridView) findViewById(R.id.grid); grid.setAdapter(adapter); grid.setOnItemClickListener(new OnItemClickListener(){ public void onItemClick(A (HowTos)