title: android.content.res.Resources$NotFoundException: Resource ID #0x0 Android error
body: <p>I am Creating an ArrayAdapter's Super class in which I am binding the data I receive from the object and put them into the TextViews.<br>
  The code is not any complicated and I have double checked the ids of all the TextViews in my XML.  </p>
  
  <p>And I have checked all the other questions with the same title.<br>
  None of them seem to work in this case.</p>
  
  <p>Attaching my code below. </p>
  
  <pre><code>public class EarthquakeAdapter extends ArrayAdapter&lt;Earthquake&gt; 
      {
          public EarthquakeAdapter(Context context, int resource) {
              super(context, resource);
          }
          public EarthquakeAdapter(Activity activity, ArrayList&lt;Earthquake&gt; Earthquakes)
          {
              super(activity,0, (List&lt;Earthquake&gt;) Earthquakes);
          }
  
          @Override
          public View getView(int position, View convertView, ViewGroup parent) {
              super.getView(position, convertView, parent);
              View ListItemView = convertView;
              if(ListItemView == null)
              {
                  ListItemView = LayoutInflater.from(getContext()).inflate(
                      R.layout.earthquake_list_item, parent, false);
              }
  
              Earthquake currentItem = getItem(position);
  
              TextView magnitude = (TextView) 
              ListItemView.findViewById(R.id.magnitude);
              //Double m = ;
              magnitude.setText(""+currentItem.getmMag());
  
              TextView location = (TextView) ListItemView.findViewById(R.id.Location);
              location.setText(currentItem.getmLocation());
  
              TextView date = (TextView) ListItemView.findViewById(R.id.date);
              date.setText(currentItem.getmDate());
  
              return ListItemView;
          }
  </code></pre>
  
  <p>and then there is the xml file.</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:orientation="horizontal" android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:padding="16dp"
      android:id="@+id/list_view_container"&gt;
  
      &lt;TextView
          android:id="@+id/magnitude"
          android:layout_width="0dp"
          android:layout_height="60dp"
          android:layout_weight="1"
          tools:text="7.6"/&gt;
      &lt;TextView
          android:id="@+id/Location"
          android:layout_width="0dp"
          android:layout_height="60dp"
          android:layout_weight="1"
          tools:text="San Fransisco"/&gt;
      &lt;TextView
          android:id="@+id/date"
          android:layout_width="0dp"
          android:layout_height="60dp"
          android:layout_weight="1"
          tools:text="Date"/&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>This is my Earthquake Class.</p>
  
  <pre><code>public class Earthquake 
       {
          private double mMag;
          private String mLocation;
          private String mDate;
  
          public Earthquake(double Mag, String Location, String Date){
              mMag = Mag;
              mLocation = Location;
              mDate = Date;
          }
  
          public String getmDate() {
              return mDate;
          }
  
          public double getmMag() {
              return mMag;
          }
  
          public String getmLocation() {
  
              return mLocation;
          }
      }
  </code></pre>
  
  <p>and This is the Error LOG.</p>
  
  <pre><code>06-11 20:38:36.570 9359-9359/com.example.android.quakereport W/ResourceType: No package identifier when getting value for resource number 0x00000000 06-11 20:38:36.571 9359-9359/com.example.android.quakereport D/AndroidRuntime: Shutting down VM 06-11 20:38:36.581 9359-9359/com.example.android.quakereport E/AndroidRuntime: FATAL EXCEPTION: main
  Process: com.example.android.quakereport, PID: 9359
     android.content.res.Resources$NotFoundException: Resource ID #0x0
         at android.content.res.Resources.getValue(Resources.java:1369)
         at android.content.res.MiuiResources.getValue(MiuiResources.java:145)
         at android.content.res.Resources.loadXmlResourceParser(Resources.java:2824)
         at android.content.res.Resources.getLayout(Resources.java:1183)
         at android.view.LayoutInflater.inflate(LayoutInflater.java:425)
         at android.widget.ArrayAdapter.createViewFromResource(ArrayAdapter.java:378)
         at android.widget.ArrayAdapter.getView(ArrayAdapter.java:369)
         at com.example.android.quakereport.EarthquakeAdapter.getView(EarthquakeAdapter.java:28)
         at android.widget.AbsListView.obtainView(AbsListView.java:2346)
         at android.widget.ListView.makeAndAddView(ListView.java:1876)
         at android.widget.ListView.fillDown(ListView.java:702)
         at android.widget.ListView.fillFromTop(ListView.java:763)
         at android.widget.ListView.layoutChildren(ListView.java:1685)
         at android.widget.AbsListView.onLayout(AbsListView.java:2148)
         at android.view.View.layout(View.java:16653)
         at android.view.ViewGroup.layout(ViewGroup.java:5438)
         at android.widget.FrameLayout.layoutChildren(FrameLayout.java:336)
         at android.widget.FrameLayout.onLayout(FrameLayout.java:273)
         at android.view.View.layout(View.java:16653)
         at android.view.ViewGroup.layout(ViewGroup.java:5438)
         at android.support.v7.widget.ActionBarOverlayLayout.onLayout(ActionBarOverlayLayout.java:435)
         at android.view.View.layout(View.java:16653)
         at android.view.ViewGroup.layout(ViewGroup.java:5438)
         at android.widget.FrameLayout.layoutChildren(FrameLayout.java:336)
         at android.widget.FrameLayout.onLayout(FrameLayout.java:273)
         at android.view.View.layout(View.java:16653)
         at android.view.ViewGroup.layout(ViewGroup.java:5438)
         at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1743)
         at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1586)
         at android.widget.LinearLayout.onLayout(LinearLayout.java:1495)
         at android.view.View.layout(View.java:16653)
         at android.view.ViewGroup.layout(ViewGroup.java:5438)
         at android.widget.FrameLayout.layoutChildren(FrameLayout.java:336)
         at android.widget.FrameLayout.onLayout(FrameLayout.java:273)
         at com.android.internal.policy.PhoneWindow$DecorView.onLayout(PhoneWindow.java:2680)
         at android.view.View.layout(View.java:16653)
         at android.view.ViewGroup.layout(ViewGroup.java:5438)
         at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:2198)
         at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1958)
         at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1134)
         at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6045)
         at android.view.Choreographer$CallbackRecord.run(Choreographer.java:860)
         at android.view.Choreographer.doCallbacks(Choreographer.java:672)
         at android.view.Choreographer.doFrame(Choreographer.java:608)
         at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:846)
         at android.os.Handler.handleCallback(Handler.java:739)
         at android.os.Handler.dispatchMessage(Handler.java:95)
         at android.os.Looper.loop(Looper.java:148)
         at android.app.ActivityThread.main(ActivityThread.java:5441)
         at java.lang.reflect.Method.invoke(Native Method)
         at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:738)
         at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:628)
  </code></pre>