“Emulator not opening in Visual Studio for Xamarin mobile app development.”

huangapple go评论65阅读模式
英文:

Emulator not opening in Visual Studio for Xamarin mobile app development

问题

我正在尝试使用Xamarin和Visual Studio 2019在Windows 8.1 Pro操作系统上开发移动应用程序。我安装了.NET桌面开发、ASP.NET和Web开发以及使用.NET工作负载的移动开发,然后我尝试在Visual Studio中运行Pixel 2 Pie 9.0 - API 28模拟器。

当我尝试通过Android设备管理器启动模拟器时,我收到以下错误消息:

设备错误:警告:意外的'-prop'值('monodroid.avdname=pixel_2_pie_9_0_-_api_28'),仅支持'qemu.'属性 警告:意外的'-prop'值('emu.uuid=a7af4d97-19e3-499d-9c26-334ea3d7cfe0'),仅支持'qemu.'属性

当我尝试通过Visual Studio用户界面顶部的绿色三角形启动模拟器时,我收到以下性能警告:

性能警告:在Hyper-V上启动Android模拟器pixel 2 pie 90-api_28需要安装Windows Spring Creators Update(Redstone 4)或更新的Windows版本。请更新您的系统并重试。

我的笔记本电脑配置如下:

操作系统:Windows 8.1 Pro
64位操作系统
处理器:Intel(R) Core(TM) i3-5005U CPU @ 2.00GHz
RAM:4.00 GB

我通过Android设备管理器编辑了我已安装的模拟器。在那里,我将其名称和处理器更改为x86_64,而不是x86,并进行了下载。然后我重新启动了计算机并运行了模拟器。但是仍然出现了与前面提到的相同的双重错误消息,没有任何不同。由于我的数据有限,我没有浪费时间进行更多的猜测。但我将非常乐意接受您的任何建议。

我想要在这个操作系统下解决上述问题。我目前无法升级我的操作系统到Windows 10或11。我希望在Visual Studio中尽量减少错误消息。不必使用另一个模拟器或旧技术也没有问题。

这些错误可能是什么原因,我该如何解决?对于任何帮助或建议,我将非常感激。提前感谢您。

尽管与此直接相关,我还要提到以下问题:

  • 当我在Visual Studio Xamarin中安装模拟器时,我收到提示安装英特尔HAXM。但自动安装失败了,然后我从英特尔网站手动下载并安装了它。之后出现了上面截图中的两个错误。
  • 在进行这些操作时,我已经安装了最新版本的Visual Studio 2022和这个2019版本。(我能够在Windows 8.1 Pro上同时安装两者)然后我卸载了2022版本。
  • 此外,尽管我在Visual Studio升级版本16.11.25后安装了它,但一天多以后,在Visual Studio安装程序或IDE中的版本安装中没有更新。
  • 在我的Visual Studio安装程序中,在“修改”按钮上方,总计需要的空间中注明了13MB的不可移除空间。我多次点击“修改”按钮,但它无法消失。(这可能与安装程序的“系统缓存、工具和具有固定位置的SDK - 13MB”选项卡中的“System cache, tools, and SDKs with fixed locations - 13 MB”注释有关。)
  • 当首次打开ASP.NET和Web开发以及使用.NET的移动开发工作负载时,默认情况下未包括nuget.org包源。因此,包出现了错误。后来我通过添加nuget.org包源来解决了这个问题。
英文:

I am trying to develop a mobile app using Xamarin and Visual Studio 2019 on a Windows 8.1 Pro operating system. I installed the .NET desktop development, ASP.NET and web development, and Mobile development with .NET workloads, and I am trying to run the Pixel 2 Pie 9.0 - API 28 emulator in Visual Studio.

When I try to launch the emulator through the Android Device Manager, I get the following error:

> Device error: WARNING: unexpected '-prop' value ('monodroid.avdname=pixel_2_pie_9_0_-_api_28'), only 'qemu.' properties are supported WARNING: unexpected '-prop' value ('emu.uuid=a7af4d97-19e3-499d-9c26-334ea3d7cfe0'), only 'qemu.' properties are supported

enter image description here

When I try to launch the emulator through the green triangle at the top of the Visual Studio user interface, I get the following performance warning:

> Performance Warning: Launching the Android Emulator pixel 2 pie 90-api_28 on Hyper-V needs Windows Spring Creators Update (Redstone 4) or newer installed. Please update your system and retry.

enter image description here

My laptops

> OS : Windows 8.1 pro
>
> 64-bit Operating System
>
> Processor: Intel(R) Core(TM) i3-5005U CPU @ 2.00GHz
>
> RAM : 4.00 GB
>
> enter image description here

I went through Android Device Manager and edited the emulator I had installed. There I changed its name and processor to x86_64 instead of x86 and downloaded it. Then I restarted the computer and ran the emulator. But there also the same double error message as mentioned earlier, no difference. My data is limited so I didn't waste it on more guesswork. But I will gladly accept any of your recommendations

I want to solve the above problems under this operating system. I am currently unable to upgrade my operating system to Windows 10 or 11. I want to work in Visual Studio with minimal error messages. Having to use another emulator or old technology is not a problem there.

What could be causing these errors, and how can I resolve them? Any help or suggestions would be greatly appreciated. Thank you in advance.

Although not directly related to this, I will mention the following issues.

  • When I installed the emulator in Visual Studio Xamarin I got a prompt to install intel HAXM. But its automatic installation failebd and I downloaded and installed it manually from Intel website there. After that I got the two errors in the screenshot above.
  • When doing that I had installed both the latest version of Visual Studio 2022 and this 2019 version. (I was able to install both in Windows 8.1 Pro) Then I uninstalled the 2022 version.
  • Also, even though I installed it under the update I received for version 16.11.25 of Visual Studio, over a day later, It's not updated in the Visual Studio installer or the versioned install in the IDE.
  • And in my Visual Studio installer, above the Modify button, under Total Space Required , 13MB of non-removable space is noted. I have run the Modify button several times but it won't go away. (That may have something to do with the note "System cache, tools, and SDKs with fixed locations - 13 MB" on the Installation locations tab in the installer.)
  • When opening ASP.NET and wed development and Mobile development with .NET (out of support) workloads for the first time, the nuget.org package source was not included in the package sources by default. So the packages got errors. I then solved the problem by adding the nuget.org package to the source.

答案1

得分: 0

你可以查看此硬件加速以提升模拟器性能(Hyper-V和HAXM),获取更多信息。

在这篇文章中,你可以看到Hyper-V的最低要求。
你的计算机硬件必须满足以下要求:

  • 64位的英特尔或AMD Ryzen CPU,具备二级地址转换(SLAT)。
  • CPU支持虚拟机监视器模式扩展(Intel CPU上的VT-c)。
  • 至少4GB的内存。
  • 虚拟化技术(根据主板制造商可能有不同标签)。
  • 硬件执行数据预防。
  • 确保Windows版本至少为1803。

要验证你的计算机硬件和软件是否与Hyper-V兼容,请打开命令提示符并输入以下命令:systeminfo

英文:

You can check this Hardware acceleration for emulator performance (Hyper-V & HAXM) for more information.

In this article, you can see the minimum criterion of the Hyper-V.
Your computer hardware must meet the following requirements:

  • A 64-bit Intel or AMD Ryzen CPU with Second Level Address Translation
    (SLAT).
  • CPU support for VM Monitor Mode Extension (VT-c on Intel CPUs).
  • Minimum of 4-GB memory.
  • Virtualization Technology (may have a different label depending on
    motherboard manufacturer).
  • Hardware Enforced Data Execution Prevention.
  • Verify that the Windows Version is at least 1803

To verify that your computer hardware and software is compatible with Hyper-V, open a command prompt and type the following command: systeminfo.

答案2

得分: 0

我取消了控制面板中的Hyper-V选项,并重新启动了计算机,模拟器在没有错误消息的情况下打开了。但是启动时间很长。

英文:

I unticked Hyper-V through the control panel and restarted the computer, where the emulator opened without error messages. But it takes a long time

huangapple
  • 本文由 发表于 2023年2月19日 02:04:05
  • 转载请务必保留本文链接:https://go.coder-hub.com/75495345.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定