Syntax error annotations only available if source level is 1-5 greater

Syntax error annotations only available if source level is 1-5 greater

OR
Syntax error, annotations are only available if source level is 1.5 or greater

If you getting below compilation error:

Syntax error annotations only available if source level is 1.5 greater

 

Solution: It means compiler compliance level version is old and not 1.5 version. To change this:
Right click project –> Properties –> Java Compiler –> Change Compiler compliance level to higher version as shown below then click Apply –> OK to rebuild the project:

Syntax error annotations only available if source level is 1-5 greater

 

This will resolve issue of Syntax error annotations only available if source level is 1-5 greater

Leave a Reply

Your email address will not be published. Required fields are marked *