For windows:
To get the exact path to the system image, first try downloading it from Android Studio, after loading 1%, stop the download and go along the SDK path.
For instance. C: \ Users \ TBR \ AppData \ Local \ Android \ Sdk, you will see the name of the folder "system-images" this folder was created from the download part, open the subfolder until you reach the last subfolder.
For instance. C: \ Users \ TBR \ AppData \ Local \ Android \ Sdk \ image system \ android-27 \ google_apis \ x86 i.e. x86 - last subfolder (delete all contents of this last subfolder)
Download the system images manually, unzip and copy all the content, and then paste it into the last subfolder. Download link for android-27 - https://dl.google.com/android/repository/sys-img/google_apis_playstore/x86-27_r03.zip
Go back to android studio and you will see a system image there.
source share