Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

The compiler compliance specified is 1.6 but a JRE 1.8 is used

My eclipse reported the warning that "The compiler compliance specified is 1.6 but a JRE 1.8 is used".

I have built my HelloWorld Android application using Java1.8, however, I got that warning and I cannot build up my project. I have tried to set the compiler compliance to java1.8. But I got another error that

"Android requires compiler compliance level 5.0 or 6.0. Found '1.8'"

.I don't know how to fix this problem?

like image 795
Jessie Avatar asked May 30 '19 05:05

Jessie


1 Answers

Possible solution:

  1. Right-click on your project and select "Android Tools -> Fix Project Properties". (if this doesn't work, try the following option)
  2. Right-click on your project and select "Properties -> Java Compiler", check "Enable project specific settings" and select 1.5 or 1.6 from the "Compiler compliance settings" select box.
  3. Under Window -> Preferences -> Java -> Compiler, set Compiler compliance level to 1.5 or 1.6.
like image 51
Romil Patel Avatar answered Oct 11 '22 14:10

Romil Patel