Cannot update xcode on AppStore

Re-login your apple id in App Store might help. If not, you can download the latest Xcode in developer website instead of updating.

https://developer.apple.com/downloads


You actually doesn't have to go to developer website as @user9749232 said. If you move your current Xcode file from Applications(Finder -> Applications) to trash, you can then download the latest Xcode from AppStore itself. If you want your Xcode back, take it back from trash.


For me it was due to OS version not being compatible with XCode version. I updated to the newest os and it worked.