无法在 Visual Studio 2015 上的 Xamarin 上部署或运行​​模拟器 [英] Unable to deploy or run emulators on Xamarin on Visual Studio 2015

查看:44
本文介绍了无法在 Visual Studio 2015 上的 Xamarin 上部署或运行​​模拟器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遇到了一个有点奇怪的问题.我用谷歌搜索了一下,我发现一些人有类似的问题,但建议的解决方案都不适合我.

这是我的 Android 虚拟设备管理器.目前这两个都没有显示在 Visual Studio 中.

Visual Studio 看不到任何 AVD,句号.

解决方案

您错过了添加 Emulator Accelerator (Haxm installer) ,因此在启动模拟器时遇到问题.

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.

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. 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".

I tried the following solutions:

  • I updated Xamarin to the latest version.
  • I ran Visual Studio with admin rights
  • I updated the Android SDK to version 24, revision 5.
  • Even though the template project does not seem to have any NuGet packages, I checked if there is anything there that needs updating.
  • Downloaded and installed Intel HAXM both separately (via a link from Xamarin's website) and from the Android SDK manager.
  • 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. 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. 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.

At first I came across error IDE0006 , both in the standalone Xamarin.Android app and in another Xamarin.Forms portable app. 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. 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. Now the emulators are started from the emulator manager (albeit without showing anything) but Visual Studio still cannot see them nor launch them.

Screenshots:

This is my Visual Studio window and what it shows.

And here is my Android Virtual Device Manager. Neither of these two is showing in Visual Studio at the moment.

Visual Studio cannot see any of the AVDs, period.

解决方案

You missed to add the Emulator Accelerator (Haxm installer) , so facing issue to start the emulator.

这篇关于无法在 Visual Studio 2015 上的 Xamarin 上部署或运行​​模拟器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆