title: Android Studio compile error with added resources
body: <p>I have added this line of code to my program:</p>
  
  <pre><code>icon1.setImageResource(getResources().getIdentifier(item1, "drawable", getApplicationContext().getApplicationInfo().packageName));
  </code></pre>
  
  <p>And have added images (.png) to my drawable folder. When I compile I get the following error: </p>
  
  <pre><code>Error:(773, 32) error: &lt;identifier&gt; expected
  Error:(773, 37) error: illegal start of type
  </code></pre>
  
  <p>The error location in R.java:</p>
  
  <pre><code>public static final class drawable {
          public static final int 1001=0x7f020000;
          public static final int 1004=0x7f020001;
          public static final int 1006=0x7f020002;
          public static final int 1011=0x7f020003;
          public static final int 1018=0x7f020004;
          public static final int 1026=0x7f020005;
          public static final int 1027=0x7f020006;
          ..........
  </code></pre>
  
  <p>Each one of those throws its own pair of those errors. </p>
  
  <p>I'm putting the images into the /res/drawable-hdpi folder. Is the issue that the file names are all numeric (ex. 1023.png)?</p>
  
  <p>What could be the cause of this?</p>