This is an issue with the JDK, where @Override is JDK5, but does not support an implementation of the interface. JDK6 fixes this Bug by adding @Override to methods of parent classes and implementations of interfaces.
To fix this, first make sure you have JDK version 1.6 or higher installed on your machine (mine had JDK 1.7 installed),
Then, select the Eclipse menu Windows->; Preferences–> java-> Compiler–> Compiler Compliance Level Select 1.7, refresh the project, and recompile.
If the problem is not resolved, right-click on the project that reported the error and select Properties–>; Java Compiler–> Select 1.7 in Compiler Compliance Level to refresh the project and recompile.
Source of the original article: Click to open the article
- Eclipse .java File Syntax error, parameterized types are only available if source level is 1.5 or
- The solution of multiple markers at this line @ override
- Syntax error, annotations are only available if source level is 1.5 or greater.
- Eclipse Syntax error, annotations are only available if source level is 1.5 or greater
- Solve the Java “syntax error on token enum” problem
- The import Maven project appears http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException Solutions
- Android learning notes 03: some problems and solutions in the learning process
- Solutions to the problem that CodeBlocks cannot be used
- Fatal error C1010: unexpected end of file encountered while looking for precompiled header. Did you forget to add “ා include” StdAfx. H to the source
- Syntax error, insert “Finally” to complete TryStatem in Myeclipse in Java-
- Solution to the problem of vs2017 error report unable to open source file
- Maven Compilation error jdwp on getting class status, jvmtierror = JVMTI_ERROR_WRONG_PHASE(112)
- javac Task Error source release 1.7 requires target release
- An error occurred while collecting items to be installed
- Eclipse automatic prompt setting method and optimization
- The cxx compiler identification is unknown
- “Method does not override method from its superclass”
- Solution to garbled code problem after importing project in eclipse
- The C compiler identification is unknown