-1

Im having trouble solving this error: Severity Code Description Project File Line Suppression State Error java/lang/Object.class) : major version 52 is newer than 51, the highest major version supported by this compiler.

Almost everything online says that I have to go to System/Enviroment Settings and change a path in their but the path they specify isnt there. Im out of ideas and been stuck on this for quite awhile! Im using Visual Studio/Xamarin.

javac -version says 1.7.0_71

SEng
  • 89
  • 2
  • 5

2 Answers2

0

You don't need to change the path, all that I did was:

Delete and the reinstall the Android SDK manager, then from there make sure you only have what you need installed.

Don't install multiple API's or all of the SDK build-tools, get the latest build tool and any that you absolutely NEED after that. I also recommend getting the Android Support Repository and make sure that the Android NDK is installed.

ΦXocę 웃 Пepeúpa ツ
  • 47,427
  • 17
  • 69
  • 97
0

The error "major version 52 is newer than 51 ..." means that JDK 1.8 is needed.

(AFAIK, reinstalling Android SDK manager, as suggested in Aaron's answer, will not also update java to JDK 1.8.)

Steps:

  1. Download JDK 1.8 from Oracle, look for "JDK Download". That will take you to a page with choices including "Windows x86" and "Windows x64". I believe Android SDK requires "x86" version even on 64-bit windows, but I am not 100% sure. (I use Xamarin Studio rather than Visual Studio, which does always require x86.)
  2. Follow whatever instructions you found, to update the path used by Visual Studio to locate JDK. For x86 version, something like:

C:\Program Files (x86)\Java\jdk1.8.n_nnn\bin\java.exe

. Or you might need to set the path to the jdk folder itself:

C:\Program Files (x86)\Java\jdk1.8.n_nnn

  1. Reboot.
ToolmakerSteve
  • 18,547
  • 14
  • 94
  • 196