How to fix error message “Please select Android SDK” in Android Studio

To fix this error, from the Android Studio menu, select the option File->Sync Project with Gradle Files

The error would go.