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):
My example is:
My project has MainActivity
, AndroidAnnotations creates an extended class MainActivity_
under .apt_generated.
Elsewhere in the DetailActivity
, my code has a reference to MainActivity_:
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.
Am I missing some setting?
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.
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.
As per comments above from piwai the anwser is:
Eclipse 3.5+ - Annotation processor: Generated classes cannot be imported