Swift UI Canvas Isn't Showing up

I am trying to learn swift UI now and everything was going smoothly. The next day I try to open the project right back up but I can't see the canvas. I have tried numerous times but they all don't work. The diagnostics say this :

file '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.2.sdk/usr/lib/swift/shims/RuntimeStubs.h' has been modified since the module file '/var/folders/ky/d075t_497gs6yynw5cd489hw0000gn/C/clang/ModuleCache/HP5PGJ664UGB/SwiftShims-2TTN5UXQBRCCQ.pcm' was built: mtime changed


CompileDylibError: Failed to build ContentView.swift

Compiling failed: file '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.2.sdk/usr/lib/swift/shims/RuntimeStubs.h' has been modified since the module file '/var/folders/ky/d075t_497gs6yynw5cd489hw0000gn/C/clang/ModuleCache/HP5PGJ664UGB/SwiftShims-2TTN5UXQBRCCQ.pcm' was built: mtime changed

:0: error: file '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.2.sdk/usr/lib/swift/shims/RuntimeStubs.h' has been modified since the module file '/var/folders/ky/d075t_497gs6yynw5cd489hw0000gn/C/clang/ModuleCache/HP5PGJ664UGB/SwiftShims-2TTN5UXQBRCCQ.pcm' was built: mtime changed

:0: note: please rebuild precompiled header '/var/folders/ky/d075t_497gs6yynw5cd489hw0000gn/C/clang/ModuleCache/HP5PGJ664UGB/SwiftShims-2TTN5UXQBRCCQ.pcm'

:1:9: note: in file included from :1:

#import "LibcOverlayShims.h"

        ^

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.2.sdk/usr/lib/swift/shims/LibcOverlayShims.h:21:2: error: file '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.2.sdk/usr/lib/swift/shims/RuntimeStubs.h' has been modified since the module file '/var/folders/ky/d075t_497gs6yynw5cd489hw0000gn/C/clang/ModuleCache/HP5PGJ664UGB/SwiftShims-2TTN5UXQBRCCQ.pcm' was built: mtime changed

#include "Visibility.h"

 ^

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.2.sdk/usr/lib/swift/shims/LibcOverlayShims.h:21:2: note: please rebuild precompiled header '/var/folders/ky/d075t_497gs6yynw5cd489hw0000gn/C/clang/ModuleCache/HP5PGJ664UGB/SwiftShims-2TTN5UXQBRCCQ.pcm'

#include "Visibility.h"

 ^

:0: error: missing required module 'SwiftOverlayShims'

==================================

|  BuildInvocationError

|  

|  /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc -F /Applications/Xcode.app/Contents/SharedFrameworks-iphonesimulator -enforce-exclusivity=checked -DDEBUG -sdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.2.sdk -target arm64-apple-ios15.0-simulator -Xfrontend -serialize-debugging-options -enable-testing -swift-version 5 -I /Users/nicholasstefadouros/Library/Developer/Xcode/DerivedData/Landmarks-gcahliobeozomohdnhybmlhirqoj/Build/Intermediates.noindex/Previews/Landmarks/Products/Debug-iphonesimulator -F /Users/nicholasstefadouros/Library/Developer/Xcode/DerivedData/Landmarks-gcahliobeozomohdnhybmlhirqoj/Build/Intermediates.noindex/Previews/Landmarks/Products/Debug-iphonesimulator -emit-localized-strings -emit-localized-strings-path /Users/nicholasstefadouros/Library/Developer/Xcode/DerivedData/Landmarks-gcahliobeozomohdnhybmlhirqoj/Build/Intermediates.noindex/Previews/Landmarks/Intermediates.noindex/Landmarks.build/Debug-iphonesimulator/Landmarks.build/Objects-normal/arm64 -c -j8 -serialize-diagnostics -Xcc -I/Users/nicholasstefadouros/Library/Developer/Xcode/DerivedData/Landmarks-gcahliobeozomohdnhybmlhirqoj/Build/Intermediates.noindex/Previews/Landmarks/Intermediates.noindex/Landmarks.build/Debug-iphonesimulator/Landmarks.build/swift-overrides.hmap -Xcc -iquote -Xcc /Users/nicholasstefadouros/Library/Developer/Xcode/DerivedData/Landmarks-gcahliobeozomohdnhybmlhirqoj/Build/Intermediates.noindex/Previews/Landmarks/Intermediates.noindex/Landmarks.build/Debug-iphonesimulator/Landmarks.build/Landmarks-generated-files.hmap -Xcc -I/Users/nicholasstefadouros/Library/Developer/Xcode/DerivedData/Landmarks-gcahliobeozomohdnhybmlhirqoj/Build/Intermediates.noindex/Previews/Landmarks/Intermediates.noindex/Landmarks.build/Debug-iphonesimulator/Landmarks.build/Landmarks-own-target-headers.hmap -Xcc -I/Users/nicholasstefadouros/Library/Developer/Xcode/DerivedData/Landmarks-gcahliobeozomohdnhybmlhirqoj/Build/Intermediates.noindex/Previews/Landmarks/Intermediates.noindex/Landmarks.build/Debug-iphonesimulator/Landmarks.build/Landmarks-all-target-headers.hmap -Xcc -iquote -Xcc /Users/nicholasstefadouros/Library/Developer/Xcode/DerivedData/Landmarks-gcahliobeozomohdnhybmlhirqoj/Build/Intermediates.noindex/Previews/Landmarks/Intermediates.noindex/Landmarks.build/Debug-iphonesimulator/Landmarks.build/Landmarks-project-headers.hmap -Xcc -I/Users/nicholasstefadouros/Library/Developer/Xcode/DerivedData/Landmarks-gcahliobeozomohdnhybmlhirqoj/Build/Intermediates.noindex/Previews/Landmarks/Products/Debug-iphonesimulator/include -Xcc -I/Users/nicholasstefadouros/Library/Developer/Xcode/DerivedData/Landmarks-gcahliobeozomohdnhybmlhirqoj/Build/Intermediates.noindex/Previews/Landmarks/Intermediates.noindex/Landmarks.build/Debug-iphonesimulator/Landmarks.build/DerivedSources-normal/arm64 -Xcc -I/Users/nicholasstefadouros/Library/Developer/Xcode/DerivedData/Landmarks-gcahliobeozomohdnhybmlhirqoj/Build/Intermediates.noindex/Previews/Landmarks/Intermediates.noindex/Landmarks.build/Debug-iphonesimulator/Landmarks.build/DerivedSources/arm64 -Xcc -I/Users/nicholasstefadouros/Library/Developer/Xcode/DerivedData/Landmarks-gcahliobeozomohdnhybmlhirqoj/Build/Intermediates.noindex/Previews/Landmarks/Intermediates.noindex/Landmarks.build/Debug-iphonesimulator/Landmarks.build/DerivedSources -Xcc -DDEBUG=1 -working-directory "/Users/nicholasstefadouros/Desktop/Coding Course And Resources/Xcode Projects/Landmarks" /Users/nicholasstefadouros/Library/Developer/Xcode/DerivedData/Landmarks-gcahliobeozomohdnhybmlhirqoj/Build/Intermediates.noindex/Previews/Landmarks/Intermediates.noindex/Landmarks.build/Debug-iphonesimulator/Landmarks.build/Objects-normal/arm64/ContentView.1.preview-thunk.swift -o /Users/nicholasstefadouros/Library/Developer/Xcode/DerivedData/Landmarks-gcahliobeozomohdnhybmlhirqoj/Build/Intermediates.noindex/Previews/Landmarks/Intermediates.noindex/Landmarks.build/Debug-iphonesimulator/Landmarks.build/Objects-normal/arm64/ContentView.1.preview-thunk.o -module-name Landmarks_PreviewReplacement_ContentView_1 -Onone -Xfrontend -disable-modules-validate-system-headers -gline-tables-only

If you have an antivirus installed, remove it throw it away, you don't need it. Re-install Xcode if clearing the build folders doesn't work.

I have exactly the same error and didn’t find way to fix it . Help will be highly appreciated.

Swift UI Canvas Isn't Showing up
 
 
Q