Warning major version 52 is newer than 51, the highest major version supported by this compiler

I was having the same issue, and tearing my hair out. I had the JDK Version 8 installed, but these warnings wouldn’t go away, and eventually they generated a build-breaking error.

When I went to Tools -> Options -> Xamarin, and looked at the Android Settings, the Java Development Kit Location was pointing to jdk.1.7.xxxx, in Program Files (x86).

I changed it to 1.8.0_101, in Program Files. Then I restarted Visual Studio, and the same error happened again. Somehow, Visual Studio was detecting Version 7 of the JDK and pointing it to that automatically.

So the solution turned out to be very simple. As well as installing Version 8 of the JDK, UNINSTALL Version 7 of the JDK. As soon as I did that, Xamarin turned out to be much better behaved. This step solved a whole bunch of seemingly unrelated problems.

enter image description here

Leave a Comment