简体   繁体   English

Visual Studio 2017上的Xamarin android模拟器不可用

[英]Xamarin android emulator on Visual Studio 2017 blacked out

So I'm trying my hand at making mobile apps using C# and Xamarin on Visual Studio 2017. What I'm trying to do is test out the system by making a simple application that has two buttons that either increment or decrements a number by 1 when clicked. 因此,我正在尝试在Visual Studio 2017上使用C#Xamarin制作移动应用程序。我想要做的是通过制作一个简单的应用程序来测试系统,该应用程序具有两个按钮,这些按钮可以将数字递增或递减1单击时。 Nothing fancy. 没有什么花哨。 But when I try to run the android emulator, it is just a black screen. 但是,当我尝试运行android仿真器时,它只是一个黑屏。 Nothing loads. 没事。 And when I "x" out of the emulator, I get a There were deployment errors. Continue? 当我从仿真器中“ x”出来时,我得到一个“ There were deployment errors. Continue? There were deployment errors. Continue? dialogue box when it's done. 对话框完成后。

I have searched all over for a solution, and nothing I've tried has worked so far. 我到处都在寻找解决方案,但到目前为止我没有尝试过。 Among the things I have tried: 在我尝试过的事情中:

  • Enabling virtualization in the BIOS settings. 在BIOS设置中启用虚拟化。
  • Disabling "Use host GPU" in the AVD. 在AVD中禁用“使用主机GPU”。
  • Change from Debug mode to Release mode. 从调试模式更改为发布模式。
  • Ticked "Wipe User Data" from the launch options. 在启动选项中勾选“擦除用户数据”。
  • Restarts and rebuilds along with "clean Solution" here and there. 重新启动和重建以及“干净的解决方案”。

I also tried using the Xamarin Live Player paired with my phone to no avail. 我也尝试将Xamarin Live Player与手机配对使用,但无济于事。 (Also, I have no drawable icon in my drawable folder under resources. Is that anything that's necessary??) (此外,我的drawable drawable文件夹中的资源下也没有drawable图标。这是否是必需的??)

Here's a screenshot of my problem: 这是我的问题的屏幕截图:

https://imgur.com/a/6OhCA https://imgur.com/a/6OhCA

I'm using Visual Studio 2017 on Windows 7. 我正在Windows 7上使用Visual Studio 2017。

If you have JDK 9 installed you can try uninstalling it. 如果安装了JDK 9,则可以尝试将其卸载。 https://developer.xamarin.com/guides/android/troubleshooting/questions/jdk9-errors/#Known_Issues_with_JDK_9 https://developer.xamarin.com/guides/android/troubleshooting/questions/jdk9-errors/#Known_Issues_with_JDK_9

This fixed the problem for me. 这为我解决了问题。 I had JDK 9 installed and even if in my Xamarin options I was pointing to JDK 8 folder, it was messing up my deployment. 我已经安装了JDK 9,即使在我的Xamarin选项中,我指向的是JDK 8文件夹,它也弄乱了我的部署。

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

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