I just started with RoboGuice 2.0 but can't use injection because I always get this error in Eclipse:
"The value for annotation attribute InjectView.value must be a constant expression".
Here are two examples:
@InjectView(R.id.startView)
private ImageView startView;
@InjectFragment("taskFragment")
private TaskFragment taskFragment;
Obviously there was an issue in 2011 (
http://code.google.com/p/roboguice/issues/detail?id=139) which should have been fixed?
This happens within my library project, but all components like Activities or resource references (R.id.startView) are within this library (so RoboGuice doesn't know that it's a library). Any ideas how to get rid of this error? Or is this just an Eclipse validation issue? Maven clean, Project Update, Project clean doesn't help.