Skip to content

Android Error – Errors on Methods with @Override Annotations, Listener Types or Overridden Methods

Getting errors on every @Override annotation after importing or copying code into your workspace? Find out why it happens and how to fix it.

Ramón Invarato

When we import or copy code from somewhere else into our workspace, we may get an error on all the @Override annotations. If we hover the mouse cursor over the error, we will see the following message:

Multiple markers at this line

– implements

android.content.ContentProvider.PipeDataWriter<android.database.Cursor>.writeDataToPipe

– The method writeDataToPipe(ParcelFileDescriptor, Uri, String, Bundle, Cursor) of

type NotePadProvider must override a superclass method

Eclipse screenshot showing the @Override error: method writeDataToPipe must override a superclass method

This is caused by the different versions of the JRE and Java installed on your computer. Newer versions no longer use @Override

Depending on whether you have updated to the latest version of both the JRE and Java, there is one solution or another.

Solution if you are already up to date

Remove all the @Override annotations one by one and save everything.

Solution if you are not up to date

Update Java and the JRE.

Once updated, the @Override annotations will no longer be used.

“Android Error – Errors on Methods with @Override Annotations, Listener Types or Overridden Methods” by Ramón Invarato at jarroba.com, licensed under Creative Commons Attribution-NonCommercial-ShareAlike 3.0. Registered at Safe Creative.

Ramón Invarato

I design and build data platforms and intelligent systems, and I enjoy sharing that experience here.

You may also like

Android Error – Lost References

Getting errors across your whole Android project and "The type java.lang.String cannot be resolved"? Here's a quick fix using Organize Imports in Eclipse.

Dec 12, 2011

Comments

Leave a comment


This site uses Akismet to reduce spam. Learn how your comment data is processed.