i also had same problem. The solution i tried and it worked. Just click on pom.xml -> build as maven project -> ok & done and my file started working. May be this problem is due to maven didn't connect properly in starting. and also remember always to connect SDK to your project.