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

Mostly I'm a super newbie and started an internship at an IT company. I installed VS with Xamarin. The problem I am facing is very frustrating. Therefore, even when I create an empty project, I cannot compile it and get an error:

Severity Code Description Project File Line Suppression State The major warning version 52 is newer than 51, the highest major version supported by this compiler.

I searched all over Google and asked so many people, and still have not fixed my problem. If anyone can help me through skype or teamwiever, I will EVALUATE so much. My skype: toniterdal, feel free to add me.

+44
visual-studio xamarin xamarin.android
Jul 06 '16 at 11:09
source share
10 answers

I had the same problem and pulled out my hair. I have version 8 of the JDK installed, but these warnings will not disappear, and in the end they created a bug fix.

When I went to “Tools” → “Options” → “Xamarin” and looked at the Android settings, the location of the Java Development Kit pointed 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 an error occurred again. Somehow, Visual Studio detected Version 7 of the JDK and automatically pointed to it.

Thus, the solution turned out to be very simple. Like installing version 8 JDK, UNINSTALL Version 7 JDK. As soon as I did this, Xamarin turned out to be a lot better off. This step solved a whole bunch of seemingly unrelated problems.

enter image description here

+62
Jul 23 '16 at 10:28
source share

This error tells you that the downloadable version of the Java class was compiled using Java 8 (52), but Java 7 (51) is trying to load this compiled class.

  • Java 7 uses major version 51

  • Java 8 uses major version 52

Check which versions of Java are installed on your computer and review the Xamarin requirements and Java installation steps (see below)

Install Java SDK (JDK)

+26
Jul 06 '16 at 11:25
source share

For people having problems setting up the appropriate version of the JDK, you can try to override this option in the vs2015 options dialog:

Cross platform dialogue

+11
Jul 26 '16 at 10:21
source share

Delete the bin folder and obj folder and run the project, it will work fine

+7
Sep 06 '16 at 9:03
source share

You have a bad proguard.jar file, you need to replace this .jar with the correct version. The steps below describe how to do this. Some colleagues had the same problem.

  • Go to Settings => SDK and copy the location of the Android SDK.
  • Go to this folder (mainly / Users / USERNAME / Library / Developer / Xamarin / android-sdk-macosx) and go to the tools / proguard / lib folder.
  • Here you will find proguard.jar.
  • Rename it to proguard_OLD.jar.
  • Download the latest proguard file (e.g. https://sourceforge.net/projects/proguard/files/ )
  • Unzip and place the proguard.jar file in the tools / proguard / lib folder
  • Rebuild your project

Everything needs to be fixed!

Additional error information can be found here:

+3
Jan 03 '17 at 11:03 on
source share

The SDK has also changed for me, but in the Options-> Xamarin-> Android settings I do not have Cross Platform in Options for VS 2015Pro

+2
Nov 12 '16 at 10:34
source share

Note for users with a 64-bit version of Windows, the JDK must be x86 version, not x64 version.

eg. C: \ Program Files (x86) \ Java \ jdk1.8.0_111

+2
Dec 15 '16 at 2:59
source share

Kaloyan, you can find the settings for Java SKD in the "Tools-> Options" section and click "Xamarin" in the "Options" list, then select "Android Settings". I installed the latest version of Java (8.0.111) and then made a clean project, and now it works fine without errors. Thank you all for your messages!

+1
Nov 25 '16 at 23:07
source share

In my case, I had to reinstall JDK 8 (latest version), because other versions of JDK 7 could not work even with new projects or clean up projects, and I also had to perform a clean installation of the Android sdk server.

+1
Dec 02 '16 at 23:44
source share

Here's how I solved the same problem I encountered today:

From the control panel> Uninstall a program> uninstall the old versions of Java that are on your system. Your system should only have Jdk 1.8 and Jre 1.8.

Now go to C: / Program Files / Java and uninstall all old versions of java. If you installed JDK 1.8 and JRE 8 in C: / Program Files (x86) / Java files, cut them into the C: / Program Files / Java folder.

Then I restarted the IntelliJ IDE that I am using. He automatically asked to update the path to the SDK. Update the path to point to Jdk 1.8, and then I recompiled my files and everything started to work fine.

Hope this works for you too!

+1
Jan 18 '17 at 19:33
source share



All Articles