3

It's my first question on stackoverflow since I'm having an issue that's driving me crazy!

I'm trying to compile an old Android project (it was made about a year ago) and I'm using the Eclipse Luna IDE, the same IDE I used to develop my app. When I was developing I had Java 7 but since then I had installed Java 8. So, when I'm trying to run my app that "Unsupported major.minor version 52.0 " error comes up.

I've tried the solutions that suggest to change the jre in the Java Build Path and Java Compiler properties of the project but when I change the jre the Eclipse console gives me this error:

"Android requires compiler compliance level 5.0 or 6.0. Found '1.8' instead. Please use Android Tools > Fix Project Properties."

When I apply the suggested solutions, the first error comes up again. It's an either this or that situation.

I feel like I'm in an infinite loop! Can somebody please help?

I have Windows 7, Eclipse Luna IDE jdk1.7.0_79 and jdk1.8.0_92 installed.

akimo
  • 41
  • 3
  • Possible duplicate of [Android requires compiler compliance level 5.0 or 6.0. Found '1.7' instead. Please use Android Tools > Fix Project Properties](http://stackoverflow.com/questions/7637144/android-requires-compiler-compliance-level-5-0-or-6-0-found-1-7-instead-plea) – Mauricio Gracia Gutierrez Jul 01 '16 at 16:40
  • maybe this can help you - http://stackoverflow.com/questions/7637144/android-requires-compiler-compliance-level-5-0-or-6-0-found-1-7-instead-plea – Mauricio Gracia Gutierrez Jul 01 '16 at 16:41
  • Thank you but nothing worked. – akimo Jul 01 '16 at 17:13

2 Answers2

0

I have the same problem. I fixed it: project-properties- Java Build Path -Libraries - Add library -Jre system library - I put into jdk1.7,

project-properties- Java Compiler - change to 1.7

All done.

  • I have the same problem again the next day. I found Android SDK Build-Tools V24 need jdk1.8 .so I delete v24, install v23. all done – Jeffrey Long Nov 29 '16 at 04:41
-1

Change your compiler target level to Java 1.5 or 1.6 and it should be working.

T. Neidhart
  • 6,060
  • 2
  • 15
  • 38
  • "Android requires compiler compliance level 5.0 or 6.0. " Suggests it wouldn't work with Java 7. – Andy Turner Jul 01 '16 at 15:01
  • With Java 1.5 I get multiple "... must override a superclass method" errors with 1.6 I get the "Unsupported major.minor version 52.0" error. – akimo Jul 01 '16 at 17:04