简体   繁体   English

在Visual Studio 17 Xamarin Android上部署失败

[英]Deploy failed on Visual Studio 17 Xamarin Android

After the last update of Visual Studio Community (15.6.2) I was unable to deploy or debug projects. 在Visual Studio Community(15.6.2)的最新更新之后,我无法部署或调试项目。

I can Build the project, but when i deploy, the output appears as follows. 我可以构建项目,但是在部署时,输出如下。

部署错误

I already changed JDK, for versions 1.8.161 and 1.8.131, it did not work. 我已经更改了JDK,对于版本1.8.161和1.8.131,它不起作用。 I checked versions of the SDK I was using, so I installed API 22 and API 25, both of which I use in my project. 我检查了使用的SDK版本,因此安装了我在项目中都使用的API 22和API 25。

None of this working, I restored my Visual studio, it also did not work. 所有这些都无济于事,我恢复了Visual Studio,但也没有工作。

Looking for a solution, I deleted the android-sdk folder and uninstalled Visual Studio completely. 寻找解决方案时,我删除了android-sdk文件夹并完全卸载了Visual Studio。

After installation, to my surprise, it did not work again. 安装后,令我惊讶的是,它不再起作用。 Then I accessed Tools> Options> Xamarin and checked that there was no NDK installed. 然后,我访问工具>选项> Xamarin,并检查是否未安装NDK。 As a possible alternative I even installed it. 作为一种可能的选择,我什至安装了它。

I think my options have run out, I created a project from the beginning with the name XamarinNotRun without even a change and even then I can not deploy. 我认为我的选择用完了,我从一开始就创建了一个名称为XamarinNotRun的项目,甚至没有更改,甚至无法部署。

Some help? 一些帮助?

See: https://docs.microsoft.com/en-us/xamarin/android/troubleshooting/questions/jdk9-errors#known-issues-with-jdk-9 请参阅: https : //docs.microsoft.com/zh-cn/xamarin/android/troubleshooting/questions/jdk9-errors#known-issues-with-jdk-9

Specifically JDK 9 is on your PATH somehow and thus apksigner.bat throws an error as it's not compatible with JDK 9. 特别是JDK 9某种程度上位于您的PATH ,因此apksigner.bat引发错误,因为它与JDK 9不兼容。

The easiest remedy is to uninstall JDK 9 in any form and remove it from your path in your environment variables. 最简单的解决方法是以任何形式卸载JDK 9,并将其从环境变量中的路径中删除。 You can double check that you did this correctly by typing the following on a command line: 您可以通过在命令行上键入以下内容来再次检查您是否正确执行了此操作:

java -version

In which it results in displaying information about JDK 8 instead. 结果导致显示有关JDK 8的信息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM