Reputation: 1669
I'm using AndroidAnnotations in an Android Studio gradle project. I currently get error output from AA during compilation that says:
cannot find symbol class MyActivity_
The error output does not prevent building the application - its not really a compile error because the class is there, it seems that it is just an unfortunate timing issue with the compilation process.
Is there anything I can do to avoid these false-positive errors from AA? When there are "fake" errors shown every time I compile, its very easy to miss the real errors.
Upvotes: 8
Views: 5387
Reputation: 15046
The problem doesn't have to be in MainActivty, but it is probably because of a private modifier which is used with Android Anotations (in injection, method declaration etc) somewhere in your code
Upvotes: 1
Reputation: 71
I had same error. To solve it I have revert my last changes and it has worked again. I think it was either wrong optimized import(you must import generated classes eg. xxx_) or I injected layout by id what was not existed in the layout xml
Update
I figured it. My problem was what I had use private mofidier instead of proteced in
@ViewById(R.id.list)
private ListView list;
Upvotes: 7
Reputation: 64
Try to see if you missed to fix some errors in the class MainActivity or in someone of his Bean member that you have annoted.
Upvotes: 1