gpt4 book ai didi

swift - Xcode 12和SwiftUI : Cannot preview in this file — Failed to update preview

转载 作者:行者123 更新时间:2023-12-03 09:21:20 32 4
gpt4 key购买 nike

似乎预览停止在Xcode 12上运行!尝试预览SwiftUI文件模板并出现以下错误。任何想法如何解决这一问题?试图清理构建文件夹,删除派生数据并重新启动Xcode无济于事!
在Catalina 10.15.6上。

RemoteHumanReadableError: Failed to update preview.

The preview process appears to have crashed.

Error encountered when sending 'prepare' message to agent.

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

| RemoteHumanReadableError: The operation couldn’t be completed. (BSServiceConnectionErrorDomain error 3.)
|
| BSServiceConnectionErrorDomain (3):
| ==BSErrorCodeDescription: OperationFailed
我正在尝试预览的代码(来自SwiftUI新文件模板):
import SwiftUI

struct SwiftUIView: View {
var body: some View {
Text("Hello, World!")
}
}

struct SwiftUIView_Previews: PreviewProvider {
static var previews: some View {
SwiftUIView()
}
}

最佳答案

显然,这是Firestore的错误,很可能是原因:XCode 12 Preview Crashes when adding Firebase SDK Swift UI 2.0。此时最好的解决方案是调用 pod pod 来解决此问题。我在iOS 13以上的Xcode 12上进行了验证。

关于swift - Xcode 12和SwiftUI : Cannot preview in this file — Failed to update preview,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64038620/

32 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com