在我的框架内运行SwiftUI视图预览时遇到问题。\n这是一个项目结构。
主目标(ContentView、GradientView)中的 SwiftUI 视图预览按预期工作。
\n但是,当我\xe2\x80\x99m 尝试预览UI.xcodeproject(SwiftUIView )内的视图时,我\xe2\x80\x99m 收到错误
\n\nPotentialCrashError: Update failed\n\nXCPreviewAgent may have crashed. Check ~/Library/Logs/DiagnosticReports for any crash logs from your application.\n\n==================================\n\n| RemoteHumanReadableError\n| \n| LoadingError: failed to load library at path "/Users/yevgeniy/Library/Developer/Xcode/DerivedData/Hackathon-abjguuvpzyisdncwvpeguazdifiu/Build/Intermediates.noindex/Previews/Hackathon/Intermediates.noindex/UI.build/Debug-iphonesimulator/UI.build/Objects-normal/x86_64/SwiftUIView.1.preview-thunk.dylib": Optional(dlopen(/Users/yevgeniy/Library/Developer/Xcode/DerivedData/Hackathon-abjguuvpzyisdncwvpeguazdifiu/Build/Intermediates.noindex/Previews/Hackathon/Intermediates.noindex/UI.build/Debug-iphonesimulator/UI.build/Objects-normal/x86_64/SwiftUIView.1.preview-thunk.dylib, 0x0002): tried: \'/Users/yevgeniy/Library/Developer/Xcode/DerivedData/Hackathon-abjguuvpzyisdncwvpeguazdifiu/Build/Intermediates.noindex/Previews/Hackathon/Products/Debug-iphonesimulator/SwiftUIView.1.preview-thunk.dylib\' (errno=2), \'/Applications/Xcode_14.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/Users/yevgeniy/Library/Developer/Xcode/DerivedData/Hackathon-abjguuvpzyisdncwvpeguazdifiu/Build/Intermediates.noindex/Previews/Hackathon/Intermediates.noindex/UI.build/Debug-iphonesimulator/UI.build/Objects-normal/x86_64/SwiftUIView.1.preview-thunk.dylib\' (errno=2), \'/Users/yevgeniy/Library/Developer/Xcode/DerivedData/Hackathon-abjguuvpzyisdncwvpeguazdifiu/Build/Intermediates.noindex/Previews/Hackathon/Intermediates.noindex/UI.build/Debug-iphonesimulator/UI.build/Objects-normal/x86_64/SwiftUIView.1.preview-thunk.dylib\' (mach-o file, but is an incompatible architecture (have \'x86_64\', need \'arm64\')))\n| \n| ==================================\n| \n| | MessageSendFailure: Message send failure for <ServiceMessage 115: update>\nRun Code Online (Sandbox Code Playgroud)\n~/Library/Logs/DiagnosticReports 文件夹为空。
\n在 …