Or you can type a command in terminal as
1.killall Finder
and then type,
2.defaults write com.apple.Finder AppleShowAllFiles true
it shows hidden .android folder
Open .android folder and delete .android/avd/Nexus_5X_API_26.avd/*.lock file
and now you run emulator it works fine.