If you’re using Mac OS High Sierra, you are required to use Xcode 10.1 for compatibility.
Here is the direct link to Xcode 10.1 (requires Apple login):
https://download.developer.apple.com/Developer_Tools/Xcode_10/Xcode_10.xip or here
Additional tools (requires Apple login):
Command-line dev tools
sudo xcode-select --install
Notes
https://developer.apple.com/download/more/ (requires Apple login)
https://en.wikipedia.org/wiki/Xcode