Visual Studio + Xamarin 中不支持的 Major.minor 版本 52.0 [英] Unsupported major.minor version 52.0 in Visual Studio + Xamarin

查看:25
本文介绍了Visual Studio + Xamarin 中不支持的 Major.minor 版本 52.0的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近安装了带有 Xamarin 的 Visual Studio.

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 : 不支持major.minor 版本 52.0

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

SDK 管理器的屏幕截图:

Screenshoot of SDK manager:

从 android 7.0 (API 24) 开始,什么都没有安装.

From android 7.0 (API 24) theres nothing installed.

当我删除这个 Android SDK 构建工具 24.0.3 时,我只得到部署失败"而没有任何错误信息.

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

似乎 Visual Studio 仍在尝试使用 24 API 版本.我应该切换到 API 版本 23 吗?如果是,我该怎么做?

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?

推荐答案

您必须安装 Java JDK 1.8.除非您需要使用以前的版本,否则我建议删除 1.7.Xamarin.Android 7.0 的发行说明也包含更多信息:https://developer.xamarin.com/releases/android/xamarin.android_7/xamarin.android_7.0/

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/

注意:Xamarin.Android 7.0 需要 JDK 1.8 才能使用 Android Nougat(API 24) API.如果出现以下情况,您可以继续使用早期版本的 JDK针对早期的 Android API 级别:

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 - 最高 API 24+ JDK 1.7 - 最高 API 23 JDK 1.6 - 最高 API 20此外,需要 64 位版本的 JDK 才能使用自定义Android 设计器中的控件.

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.

这篇关于Visual Studio + Xamarin 中不支持的 Major.minor 版本 52.0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆