問題描述
我在 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的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!