I'm loving the new Lint API checks of ADT rev 17, but the new API Correctness Check has got me stumped. I have the following line of code:
listView.setOverScrollMode(OVER_SCROLL_NEVER);
Lint is reporting on this line:
Call requires API level 9 (current min is 4)
According to the documentation, I should just be able to add an annotation above the line, like so:
@TargetApi(9)
listView.setOverScrollMode(OVER_SCROLL_NEVER);
This, however, gives a syntax error in Java 1.6:
Syntax error on token(s), misplaced construct(s)