Thursday, March 22, 2012

Error in Eclipse and Android environment: The method X or type Y must override a superclass method

After importing two Android projects to Eclipse workspace, I received over 3000 errors!

* Some errors were removed after selecting the correct SDK from
Properties > Android > Project Build Target 

* Some errors were removed after clean and rebuild.


But still there were 600+ error with message:
"The method X or type Y must override a superclass method."


The solution was to set the Compiler level from 1.5 to 1.6. 

So, setting

Properties > Java Compiler > JDK Compliance level to 1.6

solves the problem.

EDIT 2012-03-24

You may need to"delete" the projects from the workspace and then import them again. You may need to do that more than once.

No comments: