Visual studio (2015) emulator for android not working - XDE.exe - Exit Code 3(适用于 android 的 Visual Studio (2015) 模拟器无法正常工作 - XDE.exe - 退出代码 3)
问题描述
我在 Visual Studio 2015 中创建了一个新的空白应用程序 (Xamarin.Forms Portable) 项目.
当我尝试在 Visual Studio Emulator for Android 中运行 Droid 项目时,我只收到一条通用错误消息:
<块引用>创建VS Emulator 5" KitKat (4.4) XXHDPI Phone"设备时出错.
所以我查看了 Tools->Visual Studio Emulator for Android,并尝试手动运行模拟器.过了一会儿,它失败了,日志说:
<块引用>24.7.2015 16:22:52:[信息性] 重新初始化已安装的配置文件.
24.7.2015 16:22:52:[信息]已安装的配置文件已初始化.设备:2 平台:1
24.7.2015 16:22:52:[信息性] 重新初始化可安装配置文件.
24.7.2015 16:22:52:[信息性] 可安装配置文件已初始化.设备:30 平台:4
24.7.2015 16:22:56:[信息性] 正在等待启动设备...
24.7.2015 16:22:56:[信息性] 发射设备:5" KitKat (4.4) XXHDPI 手机
24.7.2015 16:22:56:[信息性] 验证模拟器参数...
24.7.2015 16:22:56:[信息性] 确定模拟器是否已经在运行...
24.7.2015 16:22:56:[信息性] 正在准备虚拟机...
24.7.2015 16:22:58:[严重] 创建 'VS Emulator 5" KitKat (4.4) XXHDPI Phone' 设备时出错.
24.7.2015 16:22:58:[关键] XDE 路径:C:Program Files (x86)Microsoft XDE10.0.10240.0xde.exe
24.7.2015 16:22:58:[关键] XDE 参数:/sku Android/displayName "VS Emulator 5" KitKat (4.4) XXHDPI Phone"/memSize 2048/diagonalSize 5/video "1080x1920"/vhd "C:UserslacikeAppDataLocalMicrosoftVisualStudioEmulatorAndroidContainersLocalDevicesvhd5_KitKat_(4.4)_XXHDPI_Phoneimage.vhd"/name "VS Emulator 5-inch KitKat (4.4) XXHDPI Phone.lacike"/noStart/silent
24.7.2015 16:22:58:[严重] XDE 退出代码:3
但是,当我在 Windows Phone 模拟器中运行 WinPhone 项目时,它可以工作.它像Android Emulator一样使用XDE.exe,因此Hyper-V网络正常工作.
有什么想法吗?
更新:
当我尝试安装新的设备配置文件时,我遇到了同样的问题:
经过数小时的研究,并应用以下步骤,我终于让它工作了:
<块引用>1) 修复 Android SDK - 转到程序和功能 > Microsoft VisualStudio Emulator for Android > 更改并点击修复"
2) 删除所有 Hyper-V 虚拟开关 - 转到 Hyper-V > 虚拟交换机管理器 > 删除所有虚拟交换机
3) 运行 XdeCleanup.exe - 在我的例子中:C:Program Files (x86)MicrosoftXDE10.0.10240.0"
4) 就我而言,我之前在以太网适配器上配置了 Internet 连接共享,所以我必须禁用它
I have created a new Blank App (Xamarin.Forms Portable) project in Visual Studio 2015.
When I try to run Droid project in Visual Studio Emulator for Android, I just get a generic error message:
An error occured while creating 'VS Emulator 5" KitKat (4.4) XXHDPI Phone' device.
So I looked into Tools->Visual Studio Emulator for Android, and tried to run emulator manually. After a while it fails and log says:
24.7.2015 16:22:52: [Informational] Reinitializing installed profiles.
24.7.2015 16:22:52: [Informational] Installed profiles initialized. Devices: 2 Platforms: 1
24.7.2015 16:22:52: [Informational] Reinitializing installable profiles.
24.7.2015 16:22:52: [Informational] Installable profiles initialized. Devices: 30 Platforms: 4
24.7.2015 16:22:56: [Informational] Waiting to launch device...
24.7.2015 16:22:56: [Informational] Launching Device: 5" KitKat (4.4) XXHDPI Phone
24.7.2015 16:22:56: [Informational] Validating emulator arguments...
24.7.2015 16:22:56: [Informational] Determining if emulator is already running...
24.7.2015 16:22:56: [Informational] Preparing virtual machine...
24.7.2015 16:22:58: [Critical] An error occured while creating 'VS Emulator 5" KitKat (4.4) XXHDPI Phone' device.
24.7.2015 16:22:58: [Critical] XDE Path: C:Program Files (x86)Microsoft XDE10.0.10240.0xde.exe
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:UserslacikeAppDataLocalMicrosoftVisualStudioEmulatorAndroidContainersLocalDevicesvhd5_KitKat_(4.4)_XXHDPI_Phoneimage.vhd" /name "VS Emulator 5-inch KitKat (4.4) XXHDPI Phone.lacike" /noStart /silent
24.7.2015 16:22:58: [Critical] XDE Exit Code: 3
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.
Any ideas?
UPDATE:
When I tried to install a new device profile, I run to this same issue:
Visual Studio 2015 RC Emulator for Android doesn't start
The process is stuck on "Copying .vhd files and creating virtual machine".
UPDATE 2:
When I open a command prompt and then run xde.exe with following xde arguments:
xde.exe /sku Android /displayName "VS Emulator 5" KitKat (4.4) XXHDPI Phone" /memSize 2048 /diagonalSize 5 /video "1080x1920" /vhd "C:UserslacikeAppDataLocalMicrosoftVisualStudioEmulatorAndroidContainersLocalDevicesvhd5_KitKat_(4.4)_XXHDPI_Phoneimage.vhd" /name "VS Emulator 5-inch KitKat (4.4) XXHDPI Phone.lacike
I get following error:
After hours and hours of research, and applying following steps I finally get it working:
1) Repair Android SDK - go to Programs and Features > Microsoft Visual Studio Emulator for Android > Change and hit "Repair"
2) Remove All Hyper-V virtual switches - go to Hyper-V > Virtual switch manager > Remove all virtual switches
3) Run XdeCleanup.exe - In my case: "C:Program Files (x86)Microsoft XDE10.0.10240.0"
4) In my case I had configured Internet connection sharing on Ethernet adapter before so I had to disable it
这篇关于适用于 android 的 Visual Studio (2015) 模拟器无法正常工作 - XDE.exe - 退出代码 3的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:适用于 android 的 Visual Studio (2015) 模拟器无法正常工作 - XDE.exe - 退出代码 3
基础教程推荐
- 如何让对象对 Cocos2D 中的触摸做出反应? 2022-01-01
- 在 gmail 中为 ios 应用程序检索朋友的朋友 2022-01-01
- Android:对话框关闭而不调用关闭 2022-01-01
- UIWebView 委托方法 shouldStartLoadWithRequest:在 WKWebView 中等效? 2022-01-01
- android 应用程序已发布,但在 google play 中找不到 2022-01-01
- Kivy Buildozer 无法构建 apk,命令失败:./distribute.sh -m “kivy"d 2022-01-01
- 如何在 UIImageView 中异步加载图像? 2022-01-01
- 当从同一个组件调用时,两个 IBAction 触发的顺序是什么? 2022-01-01
- 如何在 iPhone 上显示来自 API 的 HTML 文本? 2022-01-01
- 如何在没有IB的情况下将2个按钮添加到右侧的UINavigationbar? 2022-01-01