现在的位置: 首页 > 综合 > 正文

Multiple markers at this line @Override的解决方法

2013年10月31日 ⁄ 综合 ⁄ 共 484字 ⁄ 字号 评论关闭
Multiple markers at this line
- implements android.view.View.OnClickListener.onClick
- The method onClick(View) of type new View.OnClickListener(){} must 
override a superclass method

原因:JDK1.5不支持这种写法。实现接口方法需要重写抽象方法。
解决方法:Eclipse的Window-Preferences->Java->Compiler,把Compiler compliance level从1.5改成1.6就可以了 

补充 3: Eclipse出现android Multiple markers at this line 错误:

这是由于JDK1.5的缘故,只需要将Compiler compliance level修改为1.6即可.
此处可能需要在两个地方修改
 (1) Eclipse的Window-Preferences->Java->Compiler
(2)Eclipse的Project->Properties->Java Compiler

抱歉!评论已关闭.