然后,在eclipse中修改配置,在 Windows->Preferences-->java->Compiler-->compiler compliance level 中选择 1.6,刷新工程,重新编译下; 如果还是不行,就在报错的工程上,鼠标右键选择 Properties-->Java Compiler-->compiler compliance level 中选择 1.6,刷新工程,重新编译下。 一定要1.6,现在的1.7不知道为什么还有点问题