【问题标题】:Error when using Canvas to preview SwiftUI view使用 Canvas 预览 SwiftUI 视图时出错
【发布时间】:2020-07-23 22:29:57
【问题描述】:

当我尝试在 Xcode 的 Canvas 窗口中预览我的 SwiftUI 视图时,我的项目构建成功,但我在 Canvas 窗口中收到以下错误:

UVIntegration.DTXMessageError.messageRepliedWithError("正在连接到 启动交互式代理 6310",可选(错误 域=com.apple.dt.ultraviolet.service 代码=17 "connectToPreviewHost: 无法连接到 6310:错误 Domain=RemoteBundleLoaderError Code=17 "加载库失败 /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/PrivateFrameworks/XCPreviewKit.framework/Versions/Current/XCPreviewKit 由于缺少引导符号” UserInfo={NSLocalizedDescription=加载库失败 /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/PrivateFrameworks/XCPreviewKit.framework/Versions/Current/XCPreviewKit 由于缺少引导符号}" UserInfo={NSLocalizedDescription=connectToPreviewHost: 失败 连接到 6310:错误域=RemoteBundleLoaderError Code=17“失败 加载库 /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/PrivateFrameworks/XCPreviewKit.framework/Versions/Current/XCPreviewKit 由于缺少引导符号” UserInfo={NSLocalizedDescription=加载库失败 /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/PrivateFrameworks/XCPreviewKit.framework/Versions/Current/XCPreviewKit 由于缺少引导符号}})))


GenericHumanReadableError:发生意外错误 messageRepliedWithError("正在连接已启动的交互式代理 6310",可选(错误域=com.apple.dt.xcodepreviews.service Code=17 "connectToPreviewHost: 无法连接到 6310: 错误 Domain=RemoteBundleLoaderError Code=17 "加载库失败 /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/PrivateFrameworks/XCPreviewKit.framework/Versions/Current/XCPreviewKit 由于缺少引导符号” UserInfo={NSLocalizedDescription=加载库失败 /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/PrivateFrameworks/XCPreviewKit.framework/Versions/Current/XCPreviewKit 由于缺少引导符号}" UserInfo={NSLocalizedDescription=connectToPreviewHost: 失败 连接到 6310:错误域=RemoteBundleLoaderError Code=17“失败 加载库 /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/PrivateFrameworks/XCPreviewKit.framework/Versions/Current/XCPreviewKit 由于缺少引导符号” UserInfo={NSLocalizedDescription=加载库失败 /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/PrivateFrameworks/XCPreviewKit.framework/Versions/Current/XCPreviewKit 由于缺少引导符号}}))

【问题讨论】:

    标签: xcode swiftui


    【解决方案1】:

    我已经两次遇到这个问题了。我没有一个简单的解决方案,但只有在有适用于 macOS Catalina 的软件更新时才会发生这种情况。例如,我现在使用的是 10.15.5,但有 10.15.6 的更新,我遇到了这个问题。

    希望对您有所帮助,而且这个错误不只是说“更新您的 macOS”之类的,真的很烦人。

    【讨论】:

      【解决方案2】:

      清理构建文件夹,然后杀死 Xcode,启动 Xcode,进行完整构建可能(有时)会解决问题。然后整个马戏团又开始了。 我认为这对苹果来说有点可惜。最令人沮丧的(至少对我而言)是文档几乎不存在。这都是反复试验。主要是错误。

      【讨论】:

        猜你喜欢
        • 2023-04-02
        • 1970-01-01
        • 1970-01-01
        • 2021-06-10
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2020-07-23
        相关资源
        最近更新 更多