项目导入eclipse后,implements类中的方法出现如下错误:
The method of xxx type must override a superclass? annotation:@Override
原因及解决办法
1、在jdk1.5下要使用@Override 这个annotation 必须保证 被标注方法来源于class 而不是interface。
2、检查项目的编译JRE是哪个版本的:
a)项目右键->build path->configure build path->java Compiler(左边那排中) ->在右边的Compiler compliance level 修改
或者
项目右键->build path->configure build path->Java build Path→libraries→JRE System library→edit,改为较高版本
3、确认项目的JRE System Library为1.5以上,重新编译即可