To install Xcode 9 without updating macOS you can change the minimum required version in the Xcode bundle's plist. To do that simply control-click Xcode app, click Open Package Contents
, then go inside Contents
folder, there you'll see info.plist
. Open it with Xcode you have already installed, and there you can edit value of Minimum system version
field to whatever version you have currently installed.
Also there would be some other "*.app" like "Instruments.app" and etc. They also requires the same operations.
If after all you get the same error, try to Restart your macOS.
I have used that way to install Xcode 9.2 on macOS 10.12.5 and it works.