title: How to specify build order in an Android project using AndroidAnnotations
body: <p>I use AndroidAnnotations, and since a couple of days, Eclipse sometimes (not always) fails to compile code that uses classes generated by AndroidAnnotations (pre-compile generated code):</p>
  
  <p>My example is:</p>
  
  <p>My project has <code>MainActivity</code>, AndroidAnnotations creates an extended class <code>MainActivity_</code> under .apt_generated.</p>
  
  <p>Elsewhere in the <code>DetailActivity</code>, my code has a reference to MainActivity_:</p>
  
  <p><img src="https://i.stack.imgur.com/UaFcr.png" alt="enter image description here"></p>
  
  <p>My solution so far was to remove the code, compile, then add the code back. However, this is far from elegant. It also is quite annoying and time-consuming.</p>
  
  <p>Am I missing some setting? </p>
  
  <p>Does the order in the "Order and Export" page have any influence? I've tried to move the .apt_generated directory up and down, with no positive effect.</p>
  
  <p>I was thinking that this is the same concept used by Android's resource class R. I never had any issues with code that use resources failing to compile.</p>