I am using Eclipse Indigo for Android development. The problem i face is that it does not allow @Override for non Activity overwritten methods. For example if i implement onErrorListner of MediaPlayer and i set attribute @Override with it then it gives the following compile time error:
The method onError(MediaPlayer, int, int) of type MyActivity must override a superclass method
And to fix this problem, i am suggested the following
Remove "@Override" annotation
Tough removing the @Override fixes the issue but why does it complain about it and also removing it may cause stopping some functionality of its parent etc??
I have downloaded many examples which use this “@Override” attribute with non-activity methods which proves that this is used and i might be missing some obvious thing. But i cannot run these examples in Eclipse Indigo without removing these “@Override” attributes from all the classes.
Why?
Any help is greatly appreciated.
Your project Java compiler level is set to 1.5 instead of 1.6. See here.