It happens when sometimes we copy or import the project from somewhere. The source folder is a big thing to concern about.
One simple technique is, create a new project, inside the source folder, create a new class and paste the content over there.
It will work...
Hope it helps.