添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

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?

    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

    Android Studio android sdk path

    Thanks for your response.

    I have uninstalled and reinstalled the emulator multiple times with no luck. I am running VS 2019 v11.4, which is the newest version according to the VS download page. It is also worth noting that I am running VS Community.

    As per your suggestion, I downloaded Android Studio, matched up the file paths and created the emulator in Android Studio. It works okay on Android Studio, but I am still getting the same error in Visual Studio. I have installed all the Platforms in the SDK manager for Android 9.0 API 28, which is the OS that is running on Android Studio. I have also installed all the Tools for Build 28.

    Any suggestions as to why this still doesn't work on VS?