Skip to content

Android Error – Higher Compiler Compliance Level Required

Getting the Android error "requires compiler compliance level" in Eclipse? Here are three simple solutions to fix it step by step.

Ramón Invarato

You will see the following error:

Android requires compiler compliance level X or Y. Found 'Z' instead. Please use Android Tools > Fix Project Properties.

Screenshot of the Eclipse console showing the Android error requiring compiler compliance level 5.0 or 6.0, found 1.4

There are several ways to fix this problem. We try the first one, and if it doesn’t work, we try the next one.

Solution 1

Right-click the file that shows the error and select “Android Tools / Fix Project Properties”.

Screenshot of the Eclipse project context menu with Android Tools > Fix Project Properties highlighted

Check whether the problem has been fixed. If not, move on to the next step.

Solution 2

Go to the project, then choose a class that has the problem. Go to a line with the error and hover the pointer over it; the possible fixes you can try will appear.

Screenshot of Eclipse with a syntax error on @Override and quick fixes to change the source level to 1.5

Try the different auto-fix options that Eclipse offers. Check whether the problem has been fixed. If not, move on to the next step.

Solution 3

If, for example, you get errors on @Overrides and other annotations from other compliance levels, try changing the compiler version. To do this, right-click the project that gives you trouble and select “Properties”.

Screenshot of the Eclipse project context menu with the Properties option highlighted

Then, in the “Java Compiler” tab, select “Enable Project specific settings” and change the version under “Compiler compliance level:” (the highest number, which will be the newest, is recommended). Apply the changes and click yes on the message that appears.

Screenshot of project properties, Java Compiler section, with compliance level 1.6 selected and the Apply button

The problem should now be fixed.

“Android Error – Higher Compiler Compliance Level Required” 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

Comments

Leave a comment


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