Xamarin Visual Studio - unsupported version of major.minor 52.0

I am trying to run the Hello World example from the following tutorial: https://mva.microsoft.com/en-US/training-courses/xamarin-for-absolute-beginners-16182

I get the following error:

Severityjava.lang.UnsupportedClassVersionError: com/android/dx/command/Main : Unsupported major.minor version 52.0 HelloXamarin.Droid 

I have tried many combinations of JRE / JDK versions. I deleted them, reinstalled. I tried JDK 7 and JDK 8. I keep getting the same, no matter what combination.

+7
visual-studio xamarin
source share
3 answers

I had a similar problem when the Xamarin.Android project was migrated from Xamarin Studio (Mac) to Visual Studio 2015 (Windows 10).

I solved this problem after installing JDK 1.8.0_121 (for Widows x64).

+1
source share

A solution that is not related to using the Visual Studio IDE (for example, build servers) is to import the following key into the registry after installing the JDK version 1.8.0_101:

 Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\SOFTWARE\Novell\Mono for Android] "JavaSdkDirectory"="C:\\Program Files (x86)\\Java\\jdk1.8.0_101" 

Remember to clean / update the sdks.cache files in the obj directories [Release | Debug] to reference the correct version of jdk.

For reference, here is a complete list of the paths used by Mono for Android:

 Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\SOFTWARE\Novell\Mono for Android] "AndroidNdkDirectory"="C:\\ProgramData\\Microsoft\\AndroidNDK\\android-ndk-r11c" "AndroidSdkDirectory"="C:\\Program Files (x86)\\Android\\android-sdk" "JavaSdkDirectory"="C:\\Program Files (x86)\\Java\\jdk1.8.0_101" 
0
source share

All Articles