How to clear false errors in eclipse?

From time to time in eclipse using ADT I get errors that remain in memory even after the violation code is deleted; in fact, they remain even if I delete the entire contents of the file, as shown in this screenshot:

enter image description here

Error Syntax error on token "}", delete this token

Suffice it to say that there is no such marker.

Obviously, this is a mistake, but what should I do? As a result, my code will not compile.

+6
source share
6 answers

Most of the answers did not help or was not a problem ( Clean in Ran comment worked, though ...). The easiest fix was CTRL + 1, then "Clear All Lint Markers".

+6
source

Save the file: Ctrl + S

In the eclipse menu: Project → Clean

+3
source

For me, just cutting the whole line and pasting it back eliminates this problem.

+3
source

You can remove allegedly false compiler errors in the problem viewer , for example delete the supposedly false compiler errors (screen grab)

Confirm the deletion, although javac can recreate them:

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

+1
source
  • Try to clean the project and rebuild it. He has to go now.
  • Try restarting adt by going to DDMS> devices> click on the small down arrow> select "reset adb"
  • Try restarting eclipse.

Any of the above solutions may work for you.

0
source

You delete larger content. But somewhere at the end of the bundle, which is "}", you are not mistakenly deleting it. So just remove that "}" . Then clean your project.

0
source

Source: https://habr.com/ru/post/920577/


All Articles