What does an unexpected token mean and can I solve it?

Coding John picture Coding John · Oct 15, 2015 · Viewed 13k times · Source

Android Studio is telling me that there are some "Unexpected Tokens"..

what are these??

screenshots:

error in code where the error is

error in Messages error:

Answer

Sergey Glotov picture Sergey Glotov · Oct 15, 2015

You have invisible character in these lines, \8232 is line separator. Possibly you copied it somewhere.

Try to paste it in Notepad/TextEdit and copy text from there. Point is to get rid of formatting and extra characters. Or you can just delete these lines and retype them manually.