I have been given a Source Folder (src) of a Java Project. I have created a .project file, kept it inside that folder and imported that Project int
It means your project isn't on the compilation path of Eclipse.If after the accepted answer problem persists then you need to first place that project in the compilation path. For that you need to import the project again in your workspace, after that it will work fine.
Similar problem came to me and I did whatever I have told you and it worked for me.