简体   繁体   中英

Android Emulator cannot be found VS2019

I am attempting to play around a little with xamarin within Visual Studio 2019. I built a new Xamarin Android application and just want to run the base code in the emulator, but I am getting the error in the image below. When I installed VS2019, I did so with the xamarin features including the SDK on my secondary drive and I can see the sdk file on my secondary drive, but am fairly sure that VS2019 is looking with my primary drive for some reason. Is there a way to fix this?

在此处输入图片说明

I don't bother with the SDK or emulator packages through the visual studio installer anymore. Install Android Studio, use the tools in that to download the SDK and setup the devices you want to emulate. Then back in Visual Studio, set the paths in the Xamarin/Android Settings in the options menu. Mine look something like this:

Android SDK Location: C:\\Users\\myusername\\AppData\\Local\\Android\\Sdk

Android NDK Location: C:\\Users\\myusername\\AppData\\Local\\Android\\Sdk\\ndk-bundle

This setup seems to have much support for Android and gives you the various Google apps and services in the emulators.

Fist, you should check your android sdk path by Tools > Options > Xamarin > Android Settings to view and set the Android SDK location: 在此处输入图片说明 For more details, you can check here .

Meanwhile, you should check the Android SDKs and Tools by steps: Tools -> Android -> Android SDK Manager... ,then you need install the platforms and Tools you need.Eg在此处输入图片说明 在此处输入图片说明

It seems a little bit late, but I faced this issue and I did the following to sort it out:

  1. Be sure that the BIOS virtualization is enabled
  2. Run the VS2019 as an administrator and run the Android device manager
  3. Wait a for seconds it takes some times
  4. After getting the screen of the Android device manager press the (+) plus button
  5. If you get the menu titled New Device then cancel the creation of a new device
  6. close VS2019 and log out the administrator account
  7. Log in again with your account and run the Android device manager

Hope this may help

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM