在android項目中經常會出現下面的錯誤:

 

 

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就可以了

arrow
arrow
    全站熱搜

    戮克 發表在 痞客邦 留言(0) 人氣()