yuttadhammo
yuttadhammo

Reputation: 5199

How to purge false errors in eclipse?

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:

enter image description here

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.

Upvotes: 8

Views: 9909

Answers (6)

emallove
emallove

Reputation: 1567

You can delete the supposedly false compiler errors in the Problems view window, e.g.,delete the supposedly false compiler errors (screen grab)

Confirm deletion even though javac may recreate them:

Confirm deletion even though javac may recreate them (screen grab)

Upvotes: 4

yuttadhammo
yuttadhammo

Reputation: 5199

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".

Upvotes: 7

Aviral
Aviral

Reputation: 1141

For me, just cutting the whole line and pasting it back gets rid of the issue.

Upvotes: 3

Chintan Raghwani
Chintan Raghwani

Reputation: 3370

You are deleting larger content. But some-where at Ending close of bundle which is "}", by mistake you are not deleting it. So simply delete that "}". Then clean-up your project.

Upvotes: 0

pixelscreen
pixelscreen

Reputation: 1975

  1. Try cleaning your project and re-build it. It should go.
  2. Try restarting adt by going to DDMS>devices>click on the small downward arrow>select "reset adb"
  3. Try restarting eclipse.

Any of the above solutions may work for you.

Upvotes: 0

Dmytro Danylyk
Dmytro Danylyk

Reputation: 19788

Save the the file: Ctrl + S

In eclipse menu: Project - > Clean

Upvotes: 3

Related Questions