Troubleshooting Errors on Overridden Methods after Eclipse Import
When importing Android projects into Eclipse, users often encounter errors indicating that a method "must override a superclass method." This issue stems from the default Java compiler level in Eclipse, which is set to 1.5 when importing. However, these methods are implemented interface methods, which require annotation with @Override in Java 1.6 or later.
Solution:
To resolve the issue, follow these steps:
By updating the compiler level and JRE, Eclipse will recognize the @Override annotation on the implemented interface methods, resolving the errors. Additionally, manually created methods will use the correct argument names as before, eliminating the need for manual recreation.
The above is the detailed content of Why Do I Get 'Must Override a Superclass Method' Errors After Importing Android Projects into Eclipse?. For more information, please follow other related articles on the PHP Chinese website!