Xcode crash when start

I reinstall macOS system to monterey and restore from a higher version (sonoma), the xcode (version 15.4 on sonoma) can not run, so I delete it and reinstall xcode 14.2, but it always crash when start.

here is the error log when I start it in Terminal:

command:

/Applications/Xcode.app/Contents/MacOS/Xcode

error log:

Error loading required libraries. If there is an ongoing installation please wait for it to complete. Otherwise reinstall. (dlopen(@rpath/libIDEApplicationLoader.dylib, 0x0001): Symbol not found: (_$s10Foundation10CocoaErrorV13userCancelledAC4CodeVvgZ)
  Referenced from: '/Library/Developer/PrivateFrameworks/CoreDevice.framework/Versions/A/CoreDevice'
  Expected in: '/System/Library/Frameworks/Foundation.framework/Versions/C/Foundation')
[1]    80496 abort      /Applications/Xcode.app/Contents/MacOS/Xcode

I have tried to remove some xcode related folders ~/Library/Developer, but it still not work.

Xcode crash when start
 
 
Q