title: Nullpointer when trying to find a string by ID
body: <p>I'm using the below code to find a resource by <code>id</code>;</p>
  
  <pre><code>setContentView(R.layout.golders);
      for (int i=1; i&lt;hm.size()+1;i++)
          {
              int id = getStringIdentifier("Bus"+i);
              view = (TextView)findViewById(id);
              view.setText(hm.get(i).toString());
          }
  </code></pre>
  
  <p>My <code>getStringIdentifier()</code> is working but when I try to set the text I'm getting a <code>NullPointerException</code>. </p>
  
  <p>I've used the <code>setContentView</code> to focus on the <code>golders.xml</code> file which has the <code>id</code>s that I want to update.</p>
  
  <p>I've tried Cleaning the project but that hasn't done anything either, any ideas?! Thanks!</p>
  
  <p>EDIT:</p>
  
  <pre><code>public int getStringIdentifier(String aString)
      {
          String packageName = "com.example.bustimetable.Robbos";
          int resId = getResources().getIdentifier(aString, "string", packageName);
          return resId;
        }
  </code></pre>