我开始使用Xamarin,并尝试运行示例项目。我设法安装了Android SDK,并创建了一个虚拟设备进行测试。但是,当我尝试运行项目时,出现了一个非描述性错误,表明我应该检查日志文件。当我这样做时,我发现以下两个堆栈跟踪:  System.InvalidOperationException在  Xamarin.VisualStudio.Android.AndroidVirtualDeviceProvider.StartEmulator(IAndroidVirtualDevice  virtualDevice,IProgressReport进度,CancellationToken  cancelToken)在  C:\ Users \ builder \ data \ lanes \ 3345 \ 2e397405 \ source \ XamarinVS \ src \ Core \ VisualStudio.Android \ Devices \ AndroidVirtualDeviceProvider.cs:line  148点  Xamarin.VisualStudio.Android.CommandHandlers.StartupVirtualDeviceCommandHandler.StartUp(IMonoAndroidDevice  设备,IProgressReport进度,IAndroidVirtualDeviceProvider  virtualDeviceProvider,CancellationToken cancelToken)  C:\ Users \ builder \ data \ lanes \ 3345 \ 2e397405 \ source \ XamarinVS \ src \ Core \ VisualStudio.Android \ CommandHandlers \ StartupVirtualDeviceCommandHandler.cs:line  0在  Xamarin.VisualStudio.Android.CommandHandlers.StartupVirtualDeviceCommandHandler.Execute(StartupVirtualDeviceCommand  命令,IProgressReport进度,CancellationToken  cancelToken)在  C:\ Users \ builder \ data \ lanes \ 3345 \ 2e397405 \ source \ XamarinVS \ src \ Core \ VisualStudio.Android \ CommandHandlers \ StartupVirtualDeviceCommandHandler.cs:line  45岁  Xamarin.VisualStudio.Commands.CommandHandlerBase 2.Execute(TCommand command, CancellationToken cancellationToken) in C:\Users\builder\data\lanes\3345\2e397405\source\XamarinVS\src\Core\VisualStudio\Commands\CommandHandlerBase.cs:line 125 at Xamarin.VisualStudio.Commands.CommandHandlerBase 2。 c__DisplayClass1_0。 b__0()  在  C:\ Users \ builder \ data \ lanes \ 3345 \ 2e397405 \ source \ XamarinVS \ src \ Core \ VisualStudio \ Commands \ CommandHandlerBase.cs:line  118在System.Threading.Tasks.Task 1.InnerInvoke() at System.Threading.Tasks.Task.Execute() System.InvalidOperationException at Xamarin.VisualStudio.Commands.CommandHandlerBase.ProcessAggregateInnerException(Exception innerException, IProgressReport progress) in C:\Users\builder\data\lanes\3345\2e397405\source\XamarinVS\src\Core\VisualStudio\Commands\CommandHandlerBase.cs:line 37 at Xamarin.VisualStudio.Commands.CommandHandlerBase 2.Execute(TCommand  命令,在  C:\ Users \ builder \ data \ lanes \ 3345 \ 2e397405 \ source \ XamarinVS \ src \ Core \ VisualStudio \ Commands \ CommandHandlerBase.cs:line  145点  Xamarin.VisualStudio.Commands.CommandHandlerBase 2.<>c__DisplayClass1_0.<ExecuteAsync>b__0() in C:\Users\builder\data\lanes\3345\2e397405\source\XamarinVS\src\Core\VisualStudio\Commands\CommandHandlerBase.cs:line 118 at System.Threading.Tasks.Task 1.InnerInvoke()在  System.Threading.Tasks.Task.Execute()有人知道发生了什么吗? (adsbygoogle = window.adsbygoogle || []).push({}); 最佳答案 原来的问题是我的计算机没有打开硬件虚拟化功能。我从来没有发现任何能告诉我的输出,但是当我打开它时,它开始起作用。关于c# - 将Xamarin部署到Android时出错,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/37967227/ (adsbygoogle = window.adsbygoogle || []).push({});
10-08 23:26