简体   繁体   English

无法在Visual Studio 2015的Xamarin上部署或运行​​模拟器

[英]Unable to deploy or run emulators on Xamarin on Visual Studio 2015

I am running into a somewhat odd problem. 我遇到了一个有点奇怪的问题。 I googled a bit, and I found a few people with similar problems but none of the solutions suggested worked for me. 我在Google上搜索了一下,发现一些人遇到类似的问题,但没有一个建议的解决方案对我有用。

Here is one though I did not check the log this guy is presenting. 这是一个,尽管我没有检查此人提交的日志。 This is another seemingly similar issue . 这是另一个看似相似的问题

I am following this Xamarin Quick Start guide for Android . 我正在遵循适用于Android的Xamarin快速入门指南 The solution builds just fine. 该解决方案构建良好。 I managed to follow all the steps. 我设法遵循了所有步骤。

However, once I try to debug, by clicking the giant green Play button in Visual Studio, it tells me it could not Deploy the solution, with a small message on the status bar that "Deploy failed". 但是,一旦我尝试调试,通过单击Visual Studio中绿色的绿色“播放”按钮,它告诉我它无法部署该解决方案,并且在状态栏上显示一则“部署失败”消息。

I tried the following solutions: 我尝试了以下解决方案:

  • I updated Xamarin to the latest version. 我已将Xamarin更新为最新版本。
  • I ran Visual Studio with admin rights 我以管理员权限运行Visual Studio
  • I updated the Android SDK to version 24, revision 5. 我将Android SDK更新到了版本24,修订版5。
  • Even though the template project does not seem to have any NuGet packages, I checked if there is anything there that needs updating. 即使模板项目似乎没有任何NuGet软件包,我仍检查是否有任何需要更新的内容。
  • Downloaded and installed Intel HAXM both separately (via a link from Xamarin's website) and from the Android SDK manager. 分别(通过Xamarin网站的链接)和Android SDK管理器下载并安装了英特尔HAXM。
  • I made sure the Android SDK Path in the Registry is the same as the one in Visual Studio, by editing the one in Visual Studio. 通过在Visual Studio中编辑一个, 我确保注册表中的Android SDK路径与Visual Studio中的相同 However, when I did that the "custom" names for emulators dissapeared and were replaced with the "Start" word. 但是,当我这样做时,仿真器的“自定义”名称消失了,并被“开始”一词代替。 Even when I created new Android Virtual Devices, the word "Start" remained. 即使当我创建新的Android虚拟设备时,单词“开始”仍然存在。 Clicking it still gives me the same error. 单击它仍然给我同样的错误。

Yet the issue persists. 但是问题仍然存在。

I have not tried debugging on actual Android devices as .. em .. I don't have one. 我没有尝试在实际的Android设备上调试为.. em ..我没有一个。

At first I came across error IDE0006 , both in the standalone Xamarin.Android app and in another Xamarin.Forms portable app. 最初,我在独立的Xamarin.Android应用程序和另一个Xamarin.Forms便携式应用程序中都遇到了错误IDE0006。 After updating stuff the error disappeared, and the deploy simply fails without errors, without even launching the emulator. 更新内容后,错误消失了,并且部署完全失败而没有错误,甚至没有启动模拟器。

After making sure Xamarin and the Registry are pointing to the same folder for the Android SDK (by editing it in Xamarin) all the AVD definitions simply were replaced by weird question marks. 确保Xamarin和注册表指向Android SDK的同一文件夹(通过在Xamarin中进行编辑)后,所有AVD定义都简单地由怪异的问号代替。 I deleted them and defined one of my own, and tried to start it. 我删除了它们并定义了自己的一个,然后尝试启动它。 It never started and it showed this: 它从未开始,并且显示了以下内容:

Starting emulator for AVD 'My_AVD'
emulator: WARNING: VM heap size set below hardware specified minimum of 384MB
emulator: WARNING: Setting VM heap size to 512MB
emulator: ERROR: x86 emulation currently requires hardware acceleration!
Please ensure Intel HAXM is properly installed and usable.
CPU acceleration status: VT feature disabled in BIOS/UEFI

So what did I miss? 那我想念什么呢? Or rather, what do I need to do? 更确切地说,我该怎么办?

Edit: 编辑:

Enabled Intel Virtualization in BIOS as well. 在BIOS中也启用了英特尔虚拟化。 Now the emulators are started from the emulator manager (albeit without showing anything) but Visual Studio still cannot see them nor launch them. 现在,从仿真器管理器启动了仿真器(尽管未显示任何内容),但是Visual Studio仍然看不到它们,也无法启动它们。

Screenshots: 屏幕截图:

This is my Visual Studio window and what it shows. 这是我的Visual Studio窗口及其显示的内容。 VS视窗

And here is my Android Virtual Device Manager. 这是我的Android虚拟设备管理器。 Neither of these two is showing in Visual Studio at the moment. 目前,这两个都没有显示在Visual Studio中。 AVD经理

Visual Studio cannot see any of the AVDs, period. Visual Studio看不到任何AVD,句点。 在此处输入图片说明

You missed to add the Emulator Accelerator (Haxm installer) , so facing issue to start the emulator. 您错过了添加Emulator Accelerator(Haxm安装程序)的过程 ,因此面临启动模拟器的问题。

在此处输入图片说明

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

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