But if you look at its answer, it does not help me either because I followed the steps and check all the things.

Finally, there is one comment in that article that caught my eyes.

It said:

In my case it was broken because ANDROID_HOME and ANDROID_SDK_ROOT were different, so once I set ANDROID_HOME to be the same as ANDROID_SDK_ROOT then it started working.

Then I suddenly notice the issue’s root cause.

Actually the reason why I am getting this error is that I have 2 copies of Android SDK on my PC. Why? Because I installed both VS2017 to develop Xamarin and Android Studio to develop native Android app.

However, when installing VS2017, it will automatically help you to install the Android SDK to path: C:\Program Files (x86)\Android\android-sdk. But when installing Android Studio, it will help to install the Android SDK to path: C:\Users\{UserName}\AppData\Local\Android\sdk, this is also the previous value for my ANDROID_HOME System Environment path.

Why the previous Android emulator will work?

This is a tricky thing actually. Indeed we should ask, why the current updated Android emulator will not work?

This is because: Under each Android SDK path, it will contains a system-images folder, which stores the system images that you can use for your emulator.

In my PC, the previous ANDROID_HOME path, there are only 2 system images under that folder, which are android-25 and android-26. Check below screenshot:

But my updated Android emulator is set to API level 27 which causes the problem. According to this symptom, we can also know that when trying to run Android emulator, it will still check the SDK from ANDROID_HOME, not only ANDROID_SDK_ROOT path. Because under that path, I have the system image for API Level 27.

Inspirision of the issue

At beginning, I was thinking that it would be better to keep 2 versions of Android SDK because they are installed seperately from VS and Android Studio. I was thinking that if one Android SDK environment is broken, then we can easily switch to the other one.

However, after this issue, I thought I was wrong. There are at least 2 disadvantages for doing so:

If you keep both Android SDK the same setting, such as you installed Android 6.0, 7.1, 8.0 SDKs for both, then it will cost lots of the hardware disk of your PC, which is not worth it.

If you forgot to make them the same, you will get the similar or same issue like me.

In conclusion, the best practice is to only maintain one Android SDK and if there is any issue, try fixing them or reinstall the whole Android SDK.