检查自己eclipse的配置
通过两种方式解决:
1)项目上右键-->properties-->java compiler-->building-->enable project specific setting-->build path problems-->去掉abort...这个选项。
2)项目上右键-->properties-->java compiler-->building-->enable project specific setting-->build path problems-->选中abort Incomplete build path/Circular dependencies 这两个选项修改为Warning
如果还没有解决,两种来回切换,然后重新eclipse,编译后就可以了