From time to time in eclipse with ADT, I am getting errors that stick around even after I remove the offending code; in fact, they stay even if I delete the entire content of the file, as per this screen shot:
The error is Syntax error on token "}", delete this token
Suffice to say, there is no such token.
Obviously this is a bug, but what do I do? My code won't compile as a result.
Most of the answers given didn't help or weren't the problem (Clean
in Ran's comment worked, though...). The easiest fix was CTRL+1, then "Clear All Lint Markers".
Save the the file: Ctrl + S
In eclipse menu: Project - > Clean
For me, just cutting the whole line and pasting it back gets rid of the issue.
You can delete the supposedly false compiler errors in the Problems view window, e.g.,
Confirm deletion even though javac
may recreate them:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With