title: list_item cannot be resolved or is not a field while doing JSON parsing
body: <p><strong>Having it here on list_item and also on id,title,url,offer and enddate while doing json parsing through a URL containing some data.</strong></p>
  
  <pre><code>ListAdapter adapter = new SimpleAdapter(context, jsonlist,
                      R.layout.list_item, new String[] { ID, TITLE,
                      URL, OFFER, ENDDATE }, new int[] {
                      R.id.id, R.id.title, R.id.url,
                      R.id.offer, R.id.enddate });
  </code></pre>
  
  <p><em>Complete code is here of main class in which i am doing all this!</em></p>
  
  <pre><code>package com.example.googlemapandroidv2;
  
  import java.util.ArrayList;
  import java.util.List;
  import com.example.googlemapandroidv2.R;
  import java.util.HashMap;
  import org.json.JSONArray;
  import org.json.JSONException;
  import org.json.JSONObject;
  import android.os.AsyncTask;
  import android.os.Bundle;
  import android.app.Activity;
  import android.app.ListActivity;
  import android.app.ProgressDialog;
  import android.content.Context;
  import android.content.Intent;
  import android.view.Menu;
  import android.view.View;
  import android.widget.AdapterView;
  import android.widget.ListAdapter;
  import android.widget.ListView;
  import android.widget.SimpleAdapter;
  import android.widget.TextView;
  import android.widget.Toast;
  import android.widget.AdapterView.OnItemClickListener;
  
  public class Promotions extends ListActivity {
  
  private Context context;
  private static String url = "http://expressdiner.ifeelhungry.co.uk/pushadmin/webservice/getPermotions.php";
  
  private static final String ID = "idj";
  private static final String TITLE = "titlej";
  private static final String URL = "urlj";
  private static final String OFFER = "offerj";
  private static final String ENDDATE = "enddatej";
  
  ArrayList&lt;HashMap&lt;String, String&gt;&gt; jsonlist = new ArrayList&lt;HashMap&lt;String, String&gt;&gt;();
  
  ListView lv ;
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
      new ProgressTask(Promotions.this).execute();
  }
  
  private class ProgressTask extends AsyncTask&lt;String, Void, Boolean&gt; {
      private ProgressDialog dialog;
  
      private ListActivity activity;
  
      // private List&lt;Message&gt; messages;
      public ProgressTask(ListActivity activity) {
          this.activity = activity;
          context = activity;
          dialog = new ProgressDialog(context);
      }
  
      private Context context;
  
      protected void onPreExecute() {
          this.dialog.setMessage("Progress start");
          this.dialog.show();
      }
  
      @Override
      protected void onPostExecute(final Boolean success) {
          if (dialog.isShowing()) {
              dialog.dismiss();
          }
          ListAdapter adapter = new SimpleAdapter(context, jsonlist,
                  R.layout.list_item, new String[] { ID, TITLE,
                          URL, OFFER, ENDDATE }, new int[] {
                          R.id.id, R.id.title, R.id.url,
                          R.id.offer, R.id.enddate });
  
          setListAdapter(adapter);
  
          // select single ListView item
           lv = getListView();
      }
  
      protected Boolean doInBackground(final String... args) {
  
          JSONParser jParser = new JSONParser();
  
          // get JSON data from URL
          JSONArray json = jParser.getJSONFromUrl(url);
  
          for (int i = 0; i &lt; json.length(); i++) {
  
              try {
                  JSONObject c = json.getJSONObject(i);
                  String idj = c.getString(ID);
  
                  String titlej = c.getString(TITLE);
                  String urlj = c.getString(URL);
                  String offerj = c.getString(OFFER);
                  String enddatej =c.getString(ENDDATE);
                  HashMap&lt;String, String&gt; map = new HashMap&lt;String, String&gt;();
  
                  // Add child node to HashMap key &amp; value
                  map.put(ID, idj);
                  map.put(TITLE, titlej);
                  map.put(URL, urlj);
                  map.put(OFFER, offerj);
                  map.put(ENDDATE, enddatej);
                  jsonlist.add(map);
              }
              catch (JSONException e) {
                  e.printStackTrace();
              }
          }
          return null;
      }
  }
  }
  </code></pre>
  
  <p><em>XML code is</em></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  
  xmlns:tools="http://schemas.android.com/tools"
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  android:paddingBottom="@dimen/activity_vertical_margin"
  android:paddingLeft="@dimen/activity_horizontal_margin"
  android:paddingRight="@dimen/activity_horizontal_margin"
  android:paddingTop="@dimen/activity_vertical_margin"
  tools:context="com.example.googlemapandroidv2.Promotions" &gt;
  
  &lt;ListView
      android:id="@android:id/list"
      android:layout_width="fill_parent"
      android:layout_height="wrap_content"/&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>