Package Explorer -> Right click the project -> "Android Tools" -> "Fix Project Properties"Project -> Clean
Fixes without having to restart eclipse
Android requires compiler compliance level 5.0. Please fix project properties.
I had the same problem but non of these answers helped me. I found my solution here:
Package Explorer -> Right click the project -> "Android Tools" -> "Fix Project Properties"
I had the same problem but solved in the following way
Package Explorer -> Right click the project -> Properties -> Java Build Path -> Source -> your project name/gen -> click on Remove -> Click on Add Folder -> check gen -> Ok -> Ok