Android Eclipse Java SDK

Eclipse – “Syntax error on token “…”, invalid VariableDeclaratorId”

When you importĀ an image into your res folder show following error message of type Java Problem:

Syntax error on token “{filename}”, invalid VariableDeclaratorId

because file name is invalid: must contain only [a-z0-9_.]
ie, file name must start with a lowercase letter, then it may contain lowercase/uppercase letters or numbers or underscores or dots.

Select file name on the Package Explorer then
click the right mouse button -> Refactor -> Rename

press Alt+Shift+R
and insert valid file name.

Did my solution solve your problem?