I’ve recently changed apple ID and I’ve downloaded xCode on mac with another apple ID.
Not the mac store informs me there is a new version for xCode but I need to insert password of the older Apple ID, and I can’t just use the new one. It seems the app is associated with the old apple ID.
I can’t even download a new xCode using the new apple id, because it only gives me the option to update it with the old Apple ID.
Assuming you have the issue where you are getting the error
on the App Store app, go to Store –> Sign Out
and then do the stuff suggested here
check this fix from Beartech at https://discussions.apple.com/thread/2794280?start=15&tstart=0
hope this fixes the issue for you!
edit: I think this is a different issue compared to what I had. Your only option is probbaly to delete xcode, and download with your new Apple ID