I suggest removing Xcode and then reinstall it.
To do this, launch the application "Launch Pad", then type Xcode in the search field, then, when you see the icon for Xcode, click and hold (the same way you would on an iOS device) until the "X" appears in the corner. Now click the "X" to remove the application.
No launch the application "App Store" and locate "Xcode" and reinstall.