Problem in installing Xcode on MacBook Air 2017 with macos Mojave version 10.14.5

Solution 1:

You can try to download bittorrent version of Xcode but there's always a risk of downloading files from unknown source and you may not be able to find the latest version, as I could only find Xcode 9.

Side note: In the past, I would've recommended a tool called ADCDownload, which allows you to resume downloads from Apple Developer website. But it hasn't been updated in awhile, and likely no longer working.