You need to install Android SDK from https://developer.android.com/studio/. Download and install Android Studio.
Launch the installed Android Studio. Now download any Android whose API level is 27, and install it. You can do that by navigating to Tools | SDK Manager. You should see something similar to what is shown in the following screenshot:
Here, we are installing Android 8.1, which has an API level of 27.