Before Xcode 8, this problem occurs when command line tools are installed after Xcode is installed. What happens is the Xcode-select developer directory gets pointed to /Library/Developer/CommandLineTools.
Step 1:
Point Xcode-select to the correct Xcode Developer directory with the command: