问题描述
基本上我是超级新手,开始在 IT 公司实习.我用 Xamarin 安装了 VS.我面临的问题非常令人沮丧.因此,即使我创建空项目,我也无法编译它并出现如下错误:
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 project I can't compile it and get error like this :
严重性代码描述项目文件行抑制状态警告主版本 52 比 51 更新,这是此编译器支持的最高主版本.
Severity Code Description Project File Line Suppression StateWarning major version 52 is newer than 51, the highest major version supported by this compiler.
我在谷歌上搜索并询问了很多人,但仍然没有解决我的问题.如果有人可以通过Skype或teamwiever帮助我,我会非常感激.我的 skype:toniterdal,欢迎加我.
I searched all over google and asked so many people and still no fix of my problem. If anybody can help me via skype or teamwiever i will APPRECIATE so much. My skype: toniterdal , feel free to add me.
推荐答案
我遇到了同样的问题,我的头发都快掉光了.我安装了 JDK 版本 8,但这些警告不会消失,最终它们生成了破坏构建的错误.
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.
当我转到工具 -> 选项 -> Xamarin 并查看 Android 设置时,Java 开发工具包位置指向 Program Files (x86)
中的 jdk.1.7.xxxx.
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)
.
我在 Program Files
中将其更改为 1.8.0_101.然后我重新启动了Visual Studio,同样的错误又发生了.不知何故,Visual Studio 正在检测 JDK 的第 7 版并自动将其指向.
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.
结果证明解决方案非常简单.除了安装 JDK 的第 8 版,卸载 JDK 的第 7 版.我这样做后,结果证明 Xamarin 的表现要好得多.这一步解决了一大堆看似无关的问题.
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.
这篇关于警告主要版本 52 比 51 新,这是此编译器支持的最高主要版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!