视觉工作室(2015)模拟器为Android不工作 - XDE.exe - 退出code 3模拟器、视觉、工作室、工作

2023-09-12 07:41:37 作者:乖一点就抱你

我已经在Visual Studio 2015年创建了一个新的空白应用程序(Xamarin.Forms Portable)的项目。

I have created a new Blank App (Xamarin.Forms Portable) project in Visual Studio 2015.

当我尝试在Visual Studio模拟器为Android运行的Droid的项目,我只是得到一个一般性错误消息:

When I try to run Droid project in Visual Studio Emulator for Android, I just get a generic error message:

在创建VS模拟器5奇巧(4.4)XXHDPI电话设备发生错误。

An error occured while creating 'VS Emulator 5" KitKat (4.4) XXHDPI Phone' device.

所以,我看着工具 - > Visual Studio中模拟器为Android,并试图手动运行模拟器。过了一会儿,它失败和日志说:

So I looked into Tools->Visual Studio Emulator for Android, and tried to run emulator manually. After a while it fails and log says:

2015年7月24日十六时22分52秒:[信息化]重新初始化安装配置文件

24.7.2015 16:22:52: [Informational] Reinitializing installed profiles.

2015年7月24日十六时22分52秒:[信息化]安装配置文件进行初始化。设备:2平台:1

24.7.2015 16:22:52: [Informational] Installed profiles initialized. Devices: 2 Platforms: 1

2015年7月24日十六时22分52秒:[信息化]重新初始化安装配置文件

24.7.2015 16:22:52: [Informational] Reinitializing installable profiles.

2015年7月24日十六时22分52秒:[信息化]安装的配置文件进行初始化。设备:30平台:4

24.7.2015 16:22:52: [Informational] Installable profiles initialized. Devices: 30 Platforms: 4

2015年7月24日16时22分56秒:[信息化]等待发射设备...

24.7.2015 16:22:56: [Informational] Waiting to launch device...

2015年7月24日16时22分56秒:[信息化]发射装置:5奇巧(4.4)XXHDPI电话

24.7.2015 16:22:56: [Informational] Launching Device: 5" KitKat (4.4) XXHDPI Phone

2015年7月24日16时22分56秒:[信息化]验证仿真参数......

24.7.2015 16:22:56: [Informational] Validating emulator arguments...

2015年7月24日16时22分56秒:[信息化]确定是否仿真器已经在运行...

24.7.2015 16:22:56: [Informational] Determining if emulator is already running...

2015年7月24日16时22分56秒:[信息化] preparing虚拟机...

24.7.2015 16:22:56: [Informational] Preparing virtual machine...

2015年7月24日十六点22分58秒:在创建[关键]时出现错误'VS模拟器5奇巧(4.4)XXHDPI电话设备

24.7.2015 16:22:58: [Critical] An error occured while creating 'VS Emulator 5" KitKat (4.4) XXHDPI Phone' device.

2015年7月24日十六点22分58秒:[关键] XDE路径:C:\ Program Files文件(x86)的\微软XDE \ 10.0.10240.0 \ xde.exe

24.7.2015 16:22:58: [Critical] XDE Path: C:\Program Files (x86)\Microsoft XDE\10.0.10240.0\xde.exe

2015年7月24日十六点22分58秒:[关键] XDE参数:/ SKU的Andr​​oid /显示名VS模拟器5 \奇巧(4.4)XXHDPI电话/ MEMSIZE 2048 / diagonalSize 5 /视频1080x1920/ VHD "C:\Users\lacike\AppData\Local\Microsoft\VisualStudioEmulator\Android\Containers\Local\Devices\vhd\5_KitKat_(4.4)_XXHDPI_Phone\image.vhd" /名VS模拟器5英寸奇巧(4.4)XXHDPI Phone.lacike/ noStart /无声

24.7.2015 16:22:58: [Critical] XDE Arguments: /sku Android /displayName "VS Emulator 5\" KitKat (4.4) XXHDPI Phone" /memSize 2048 /diagonalSize 5 /video "1080x1920" /vhd "C:\Users\lacike\AppData\Local\Microsoft\VisualStudioEmulator\Android\Containers\Local\Devices\vhd\5_KitKat_(4.4)_XXHDPI_Phone\image.vhd" /name "VS Emulator 5-inch KitKat (4.4) XXHDPI Phone.lacike" /noStart /silent

2015年7月24日十六点22分58秒:[关键] XDE退出code:3

24.7.2015 16:22:58: [Critical] XDE Exit Code: 3

然而,当我在Windows Phone模拟器上运行WinPhone项目,它的工作原理。它采用XDE.exe像Android模拟器,让Hyper-V的网络运行正常。

However when I run WinPhone project in Windows Phone emulator, it works. It uses XDE.exe like Android Emulator, so Hyper-V network is working.

任何想法?

更新:

当我尝试安装新设备的配置文件,我运行到同样的问题:

When I tried to install a new device profile, I run to this same issue:

Visual工作室2015年RC模拟器为Android不会启动

这个过程是停留在复制.vhd文件并创建虚拟机。

The process is stuck on "Copying .vhd files and creating virtual machine".

更新2:

当我打开命令提示符,然后用下面的XDE参数运行xde.exe:

When I open a command prompt and then run xde.exe with following xde arguments:

xde.exe / SKU的Andr​​oid /显示名VS模拟器5 \奇巧(4.4)XXHDPI电话/ MEMSIZE 2048 / diagonalSize 5 /视频1080x1920/ VHD "C:\Users\lacike\AppData\Local\Microsoft\VisualStudioEmulator\Android\Containers\Local\Devices\vhd\5_KitKat_(4.4)_XXHDPI_Phone\image.vhd" /名VS模拟器5英寸奇巧(4.4)XXHDPI Phone.lacike

逍遥模拟器工作室版 逍遥安卓模拟器工作室版下载 v6.1.0.0官方版

xde.exe /sku Android /displayName "VS Emulator 5\" KitKat (4.4) XXHDPI Phone" /memSize 2048 /diagonalSize 5 /video "1080x1920" /vhd "C:\Users\lacike\AppData\Local\Microsoft\VisualStudioEmulator\Android\Containers\Local\Devices\vhd\5_KitKat_(4.4)_XXHDPI_Phone\image.vhd" /name "VS Emulator 5-inch KitKat (4.4) XXHDPI Phone.lacike

我得到以下错误:

推荐答案

在时间和研究时间,并应用下面的步骤,我终于得到它的工作:

After hours and hours of research, and applying following steps I finally get it working:

1)修复的Andr​​oid SDK - 去程序和功能>的Microsoft Visual   工作室模拟器为Android>更改,然后点击修复

1) Repair Android SDK - go to Programs and Features > Microsoft Visual Studio Emulator for Android > Change and hit "Repair"

2)删除所有的Hyper-V虚拟交换机 - 去到Hyper-V>虚拟   开关经理>删除所有虚拟交换机

2) Remove All Hyper-V virtual switches - go to Hyper-V > Virtual switch manager > Remove all virtual switches

3)运行XdeCleanup.exe - 在我的情况:C:\ Program Files文件(x86)的\微软   XDE \ 10.0.10240.0

3) Run XdeCleanup.exe - In my case: "C:\Program Files (x86)\Microsoft XDE\10.0.10240.0"

4)对我来说,我以前这样配置的以太网适配器Internet连接共享我   不得不禁用

4) In my case I had configured Internet connection sharing on Ethernet adapter before so I had to disable it