2
votes

I've recently installed Visual Studio with Xamarin.

When I want to run even not modified app, I'm getting error

java.lang.UnsupportedClassVersionError: com/android/dx/command/Main : Unsupported major.minor version 52.0

Screenshoot of SDK manager: SDK manager

From android 7.0 (API 24) theres nothing installed.

When I remove this Android SDK Build tools 24.0.3 I get just "Deploy failed" without any error information.

Seems like Visual Studio is still trying to use the 24 API version. Should I switch to API version 23? If yes, how can I do it?

2

2 Answers

6
votes

You'll have to install the Java JDK 1.8. I would suggest removing 1.7 unless you need to use previous versions. The release notes for Xamarin.Android 7.0 have more information as well: https://developer.xamarin.com/releases/android/xamarin.android_7/xamarin.android_7.0/

Note: Xamarin.Android 7.0 requires JDK 1.8 to use the Android Nougat (API 24) APIs. You can continue to use earlier versions of the JDK if targeting earlier Android API levels:

JDK 1.8 - up to API 24+ JDK 1.7 - up to API 23 JDK 1.6 - up to API 20 Additionally, a 64-bit version of the JDK is required to use custom controls in the Android designer.

0
votes

Download and install JDK 1.8.. and change the path.. it will be work...