Multiple markers at this line
- implements android.view.View.OnClickListener.onClick
- The method onClick(View) of type new View.OnClickListener(){} must
- 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即可.此处可能需要在两个地方修改
(2)Eclipse的Project->Properties->Java Compiler