button.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
db.update();
}
});
On line 1 —> it is suggesting to convert setonclicklistener to setkeylistener
and on line 3 to remove override annotation but it should be there cant find error help me out…
It’s not mandatory to use
@Overrideonpublic void onClick(View v), but could be a good reason to verify that you aren’t violating its signature. However, if you choose to use@Override, make sure your project is compliant with Java 1.6. If not, you might get the “… must override a superclass method” error. To enable this, right-click on your project folder inside Eclipse, and selectPropertiesat the bottom. Then go toJava Compilerand select1.6from the dropdown menu at the top (Compiler compliance level).Also make sure you are using
ViewsOnClickListener: