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

后端 未结 10 1496
北恋
北恋 2020-11-28 12:02

Basicly I\'m super newbie and started internship in IT company. I installed VS with Xamarin. The problem that I\'m facing is very frustrating. So even when i create empty pr

相关标签:
10条回答
  • 2020-11-28 12:09

    For me worked to change the SDK as well, but under Options->Xamarin->Android Settings, I don't have Cross Platform in Options for VS 2015Pro

    0 讨论(0)
  • 2020-11-28 12:13

    In my case, i had to reinstall the JDK 8 (the last version) because other versions JDK 7 couldnt work even with new projects or clean up projects, and also i had to do a clean install of the android sdk.

    0 讨论(0)
  • 2020-11-28 12:15

    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.

    0 讨论(0)
  • 2020-11-28 12:16

    That error is telling you that the Java Class version that is being loaded was compiled with Java 8 (52) but Java 7 (51) is trying to load that compiled class.

    • Java 7 uses major version 51

    • Java 8 uses major version 52

    Check which Java version(s) are installed on your machine and review Xamarin's requirements and Java installation steps (linked below)

    Installing the Java SDK (JDK)

    0 讨论(0)
  • 2020-11-28 12:19

    For people having problems with setting the appropriate JDK version, you might want to try to override this setting in the vs2015 options dialog:

    0 讨论(0)
  • 2020-11-28 12:24

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

    • Go to Preferences => SDK locations and copy the Android SDK location.
    • Go to that folder (mostly /Users/USERNAME/Library/Developer/Xamarin/android-sdk-macosx) and go to the folder tools/proguard/lib.
    • Here you find a proguard.jar.
    • Rename this to proguard_OLD.jar.
    • Download the last proguard file (like this one https://sourceforge.net/projects/proguard/files/)
    • Unzip and place the proguard.jar in the tools/proguard/lib folder
    • Rebuild your Project

    Everything should be fixed!

    You can find more info about the bug here:

    • https://releases.xamarin.com/technical-bulletin-android-sdk-build-tools-24/
    0 讨论(0)
提交回复
热议问题