How to Install Emulator Executable Visual Studio Android Emulator

rjj123456 21 Reputation points
2021-10-05T05:52:36.74+00:00

I am sure I am missing something simple here, but any help would be greatly appreciated...

I am trying to run the Android emulator on Visual Studio 2019 in accordance with the Xamarin forms tutorial (https://learn.microsoft.com/en-us/xamarin/get-started/first-app/?pivots=windows), but when I try and start the emulator I get the fault:

Device error: emulator: Android emulator version 30.1.5.0 (build_id 6855416) (CL:N/A)  
emulator: Found AVD name 'pixel_2_r_11_0_-_api_30'  
emulator: Found AVD target architecture: x86  
emulator: argv[0]: 'C:\Program Files (x86)\Android\android-sdk\emulator\emulator.exe'; program directory: 'C:\Program Files (x86)\Android\android-sdk\emulator'  
emulator:  Found directory: C:\Program Files (x86)\Android\android-sdk\system-images\android-30\google_apis_playstore\x86\  
  
emulator: emuDirName: 'C:\Program Files (x86)\Android\android-sdk\emulator'  
emulator:  Found directory: C:\Program Files (x86)\Android\android-sdk\system-images\android-30\google_apis_playstore\x86\  
  
emulator: Probing for C:\Program Files (x86)\Android\android-sdk\system-images\android-30\google_apis_playstore\x86\\kernel-ranchu-64: file exists  
emulator: try dir C:\Program Files (x86)\Android\android-sdk\emulator  
emulator: Trying emulator path 'C:\Program Files (x86)\Android\android-sdk\emulator\qemu\windows-x86_64\qemu-system-x86_64.exe'  
emulator: try dir C:\Program Files (x86)\Android\android-sdk\emulator  
emulator: Trying emulator path 'C:\Program Files (x86)\Android\android-sdk\emulator\qemu\windows-x86_64\qemu-system-x86_64.exe'  
emulator: try dir C:\Program Files (x86)\Android\android-sdk\emulator\  
emulator: Trying emulator path 'C:\Program Files (x86)\Android\android-sdk\emulator\\qemu\windows-x86_64\qemu-system-x86_64.exe'  
emulator: ERROR: can't find the emulator executable.  

I have tried:

  • Uninstalling and reinstalling Visual Studio
  • Enabling Hyper-V
  • Installing & activating multiple different platforms in the SDK tools
  • Searching for the emulator file qemu-system-x86_64.exe online to add to the file path specified

With no luck. My question is how do I correctly set up the emulator so that the emulator executable is properly downloaded in the Android program files?

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,293 questions
0 comments No comments
{count} votes

Accepted answer
  1. Leon Lu (Shanghai Wicresoft Co,.Ltd.) 68,261 Reputation points Microsoft Vendor
    2021-10-06T06:33:57.807+00:00

    Please try to factory-reset the emulator or reinstall it. What's the version of Visual Studio on your pc? I am testing the function on 16.95 version. If above doesn't work, please update your VS to the lastest stable version for testing.

    And you can install Android Studio, make Android studio and visual studio to use same Android SDK path, Then create a emulator by Android Studio, start the emulator. if it works

    visual studio android sdk path
    137988-image.png

    Android Studio android sdk path
    137989-image.png


0 additional answers

Sort by: Most helpful