title: Android Studio build file R broken
body: <p>I am working on an android app which has worked and been tested many times. Today, however, in attempting to run the application for further testing, I have encountered the following error message:</p>
  
  <pre><code>C:\Users\1000\AndroidStudioProjects\WarofSol\app\build\generated\source\r\debug\com\blacktentdigital\warofsol\R.java
  Error:(1251, 32) error: identifier expected
  Error:(1251, 34) error: illegal start of type
  Error:(1251, 35) error: identifier expected
  Error:Execution failed for task ':app:compileDebugJava'.
  Compilation failed; see the compiler error output for details.
  
  &gt;Information:BUILD FAILED
  </code></pre>
  
  <p>The problem is in the <code>R.java</code> file (as listed above). It is a generated file, so I've never touched it. </p>
  
  <p>The offending line is this:</p>
  
  <pre><code>public static final class drawable {
      public static final int 3=0x7f020000;
  </code></pre>
  
  <p>Hover over the offending line gives the following warning: <code>"Identifier expected | Unexpected token"</code></p>
  
  <p>Comparisons to other R files reveal that the "3" is not supposed to be a 3, and is evidently corrupted.</p>
  
  <p>Attempts to replace the line or file with older backed-up versions have failed to produce any result because (evidently) the file is regenerating the wrong way each time I attempt the build, and I have no idea what might cause this. As I say, the problem sprang up suddenly without any provocation of which I am aware.</p>
  
  <p>I've also attempted closing the program and restarting the computer to no avail.</p>
  
  <p>Any ideas as to what might cause this and how it might be fixed?</p>