LoginSignup
8
8

More than 5 years have passed since last update.

VMware Fusion で Visual Studio 2015 同梱の Android Emulator, Windows Phone Emulator を使うには

Posted at

こんにちは。エクセルソフトの田淵です。

デモマシン MacBookAir 上の VMware Fusion 6 にある Windows 8.1 に Visual Studio 2015 をインストールしました。

起動しない

VS Emulator 管理ツール起動して、▶ から Lollipop や KitKat を起動したら、"仮想マシンが実行中であることを確認できません" という以下のエラーで起動できません。

という方への解決方法を記載します。

VMware Fusion の設定を変更

VMware KB: Windows 8 仮想マシン内で Hyper-V プラットフォームを使用できない

を参考に

  • この仮想マシンのハイパーバイザー アプリケーションを有効にする をチェック
  • vmx ファイルに hypervisor.cpuid.v0 = "FALSE" を追記

を行ってください。

これで起動できます!やってみましょう!

メモリが少ない

マジっすか…! Fusion 上の Windows 8.1 または Windows 10 に 4GB しかメモリを割り当てていない場合(私の場合 Max 8GB メモリの MBA なので 4GB が限界です)、Emulator の 2GB はデカすぎます!

Visual Studio Emulator for Android のメモリを変更

Emulator の cfg ファイルを編集します。(Hyper-V マネージャーを開いてハードウェアのメモリを 1GB に変更したところで、Emulator の cfg ファイルで実行時に再度変更されてしまうため)

cfg ファイルは %LOCALAPPDATA%\Microsoft\VisualStudioEmulator\Android\Containers\Local\Devices フォルダにあります。

5_Lollipop_(5.1.1)_XXHDPI_Phone.cfg などの任意の cfg ファイルを開いて、device.vm.ram.size=2048 を 1024 や 512 に書き換えましょう。

無事 1GB になりました。

もう一度起動>デバッグ

ヒャッホォォォオゥゥゥ!!

以上です。

コメントを頂いた @yakumomo さん、Iwasawa さん、ありがとうございました。

Xamarin 気になった方は

是非 ダウンロード(直接) / ダウンロード(弊社経由) して触ってみてください。
学習用リソースJXUG リンクページ に参考資料を纏めてますので併せてどうぞ。

Xamarin の情報が欲しい方は私のブログも購読いただいたりすると嬉しいです。

検索用にエラーログのエラーを貼っておきます


[Informational] Reinitializing installed profiles.
[Informational] Installed profiles initialized. Devices: 3 Platforms: 2
[Informational] Reinitializing installable profiles.
[Informational] Installable profiles initialized. Devices: 30 Platforms: 4
[Informational] Waiting to launch device...
[Informational] Launching Device: 5" Lollipop (5.1.1) XXHDPI Phone
[Informational] Validating emulator arguments...
[Informational] Determining if emulator is already running...
[Informational] Preparing virtual machine...
[Informational] Launching emulator...
[Critical] Could not launch 'VS Emulator 5" Lollipop (5.1.1) XXHDPI Phone' device. Exit code 10.
[Critical] XDE Path: C:\Program Files (x86)\Microsoft XDE\10.0.10240.0\xde.exe
[Critical] XDE Arguments: /sku Android /displayName "VS Emulator 5\" Lollipop (5.1.1) XXHDPI Phone" /memSize 2048 /diagonalSize 5 /video "1080x1920" /vhd "C:\Users\ytabuchi\AppData\Local\Microsoft\VisualStudioEmulator\Android\Containers\Local\Devices\vhd\5_Lollipop_(5.1.1)_XXHDPI_Phone\image.vhd" /name "VS Emulator 5-inch Lollipop (5.1.1) XXHDPI Phone.ytabuchi"
[Critical] XDE Exit Code: 10

以上です。

8
8
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
8
8