The android device manager worked by running the Visual Studio in administrator mode and by setting the path for ANDROID_HOME and ANDROID_SDK_ROOT as the default SDK path( C:\Program File (x86)\Android\android-sdk ).
Android SDK instance error while opening Android device manager in Visual Studio

I have installed Visual Studio Enterprise 2019 version 16.1.3 with mobile development features. I am using AMD processor with Windows 10 with Virtualization Technology enabled in BIOS. Have also enabled hyper-v and Windows hypervisor platform. I have attached here all the images of my installation settings and error. Eagerly looking out for solutions and ideas.
-
1 additional answer
Sort by: Most helpful
-
Tianyu Sun-MSFT 14,901 Reputation points Microsoft Vendor
2020-09-03T05:03:24.293+00:00 Hello KarthikSankaran,
Thank you for sharing images with me, I noticed that you set the Android SDK Location as
C:\Users\XXX\AppData\Local\Android\Sdk
. This isn’t the default location of Android SDK, of course, you can customize it but please note, there are some incompatibilities with the Android SDK set by Visual Studio 2019 and Android Studio.Not sure if you have installed Android Studio and set the Android SDK under this directory:
C:\Users\....
. I recommend you go to this directory:C:\Program Files (x86)\Android\android-sdk
and copy the related folders and files(Android SDK) from the customized directory to this default directory (or you can change to another customized directory) then set the Android SDK Location toC:\Program Files (x86)\Android\android-sdk
from Tools > Options... > Xamarin > Android Settings and try to open Android device manager again.Feel free to let me know the result.
Sincerely,
Tianyu
-
Hi KarthikSankaran, please try to uninstall and reinstall “Mobile development with .NET” workload by using Visual Studio Installer > find Visual Studio 2019 > More > Modify > Workloads > uncheck the “Mobile development with .NET” workload > Modify, after finishing modifying, perform the same actions and check the “Mobile development with .NET” workload this time.
Hi TianyuSun, I uninstalled and then reinstalled "Mobile development with .Net" workload. The SDK manager is still not getting updated if I use the default location for SDK manager. It is getting updated only on switching repositories. The problem with Android device manager is also not resolved. Awaiting your reply.
Hi KarthikSankaran, thank you for the reply. So after you reinstalled the workload, was the default location of SDK still empty? To narrow down this issue, please try to update Visual Studio to the latest version from VS Installer, and try to start VS by right-clicking VS > run as administrator.
Hi TianyuSun, thank you for your suggestion. I am not able to update Visual Studio using VS Installer. It is showing me the installed version is up to date. I ran Visual Studio as administrator. Now I am able to open Android device manager and create emulator. But I am not able to run the emulator as it is showing me the following error.
Hi KarthikSankaran, if you also set
ANDROID_HOME
in Environment Variables, please kindly check if theANDROID_SDK_ROOT
and theANDROID_HOME
values are using the same system path value (C:\Program File (x86)\Android\android-sdk
). There may be some conflicts if you set them with the different paths. Please also check this document Android SDK environment variables.Thank you TianyuSun. The path was different for both. Now the emulator is working.
@Karthik Sankaran Hi Karthik, I am really glad to hear that your issue is solved. If possible, you can accept the useful answer so that other forum members who have similar issues can refer to this thread and get more help. Have a nice day : )
Sign in to comment