Error in the preview of Xcode

I am getting the following error in the preview and not able so whatever to get a preview of my swiftUI codes:

ConfigurationError: noPreviewInfos(architecture: x86_64, sdkRoot: "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.0.sdk")

How do i resolve it? I removed Xcode and reinstalled it (but nothing changed)

I just ran into this issue too. I it came up for no reason and went away after restarting Xcode. I tried to undo the recent changes I had made but that didn't remove the error. It kept coming up even with the old code.

While not ideal, I'm glad the restart worked 😅

I just ran into this issue too. Seems that it went away after running the app in the simulator for some reason..

Error in the preview of Xcode
 
 
Q