每次将画布用于Hello World项目时,Xcode 11每次崩溃

时间:2019-09-24 21:13:53

标签: swiftui xcode11

我刚刚从AppStore安装了Xcode 11,并创建了一个SwiftUI项目。尝试在画布中查看ContentView时,每次Xcode崩溃

我尝试清理并删除DerivedData,创建不同的视图和不同的项目都没有成功

Application Specific Information:
ProductBuildVersion: 11A420a

Dyld Error Message:
  Symbol not found: _$s7SwiftUI7BindingV13dynamicMemberACyqd__Gs15WritableKeyPathCyxqd__G_tcluig
  Referenced from: /Applications/Xcode.app/Contents/PlugIns/UVKit.framework/UVKit
  Expected in: /System/Library/Frameworks/SwiftUI.framework/Versions/A/SwiftUI

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   dyld                            0x000000011043b44e __abort_with_payload + 10
1   dyld                            0x000000011046499e abort_with_payload_wrapper_internal + 80
2   dyld                            0x00000001104649d0 abort_with_payload + 9
3   dyld                            0x00000001104621b3 dyld::halt(char const*) + 463
4   dyld                            0x00000001103eca02 dyld::fastBindLazySymbol(ImageLoader**, unsigned long) + 140
5   libdyld.dylib                   0x00007fff6c59d29e dyld_stub_binder + 282
6   ???                             0x0000000131da48e8 OBJC_CLASS_$__TtCV5UVKit19DiagnosticsPullDown10MenuTarget + 120
7   com.apple.dt.UVKit              0x0000000131ceb3d9 protocol witness for View.body.getter in conformance InsetEditor + 9
8   com.apple.SwiftUI               0x00007fff4259da39 ViewBody.apply(_:) + 585
9   com.apple.SwiftUI               0x00007fff4259ec29 protocol witness for static UntypedAttribute._update(_:graph:attribute:) in conformance ViewBody<A> + 137
10  com.apple.AttributeGraph        0x00007fff490ec259 partial apply + 25
11  com.apple.AttributeGraph        0x00007fff490d55a7 AG::Graph::UpdateStack::update() + 1111
12  com.apple.AttributeGraph        0x00007fff490d5865 AG::Graph::update_attribute(unsigned int, bool) + 377
13  com.apple.AttributeGraph        0x00007fff490d8e6f AG::Graph::input_value_ref_slow(unsigned int, unsigned int, AGTypeID, bool*) + 199
14  com.apple.SwiftUI               0x00007fff425f32b9 LayoutTraitsProxy.layoutTraits() + 41
15  com.apple.SwiftUI               0x00007fff42a5d8e3 accumulateSpacing #1 (ofChild:) in StackLayout.Header.init(layoutContext:proxies:majorAxis:minorAxisAlignment:uniformSpacing:childStorage:capacity:) + 563
16  com.apple.SwiftUI               0x00007fff42a5cd25 StackLayout.Header.init(layoutContext:proxies:majorAxis:minorAxisAlignment:uniformSpacing:childStorage:capacity:) + 805
17  com.apple.SwiftUI               0x00007fff42a5d62d specialized ManagedBufferPointer.init(bufferClass:minimumCapacity:makingHeaderWith:) + 349
18  com.apple.SwiftUI               0x00007fff42a5fc29 specialized closure #2 in HVStack.updateOutput<A>(attributeContext:layoutContext:children:) + 329
19  com.apple.SwiftUI               0x00007fff42a6208a partial apply for specialized  + 42
20  com.apple.SwiftUI               0x00007fff426a8367 specialized static LayoutComputerDelegate.update<A>(_:maybeInPlace:create:) + 247
21  com.apple.SwiftUI               0x00007fff426b6290 specialized static LayoutComputerDelegate.update<A>(_:maybeInPlace:create:) + 16
22  com.apple.SwiftUI               0x00007fff42a5ac8c specialized HVStack.updateOutput<A>(attributeContext:layoutContext:children:) + 220
23  com.apple.SwiftUI               0x00007fff42a5acf0 specialized HVStack.updateOutput<A>(attributeContext:layoutContext:children:) + 48
24  com.apple.SwiftUI               0x00007fff4281a9f6 specialized LayoutQuery<>.update(context:) + 358
25  com.apple.SwiftUI               0x00007fff4293c7ea partial apply for protocol witness for static UntypedAttribute._update(_:graph:attribute:) in conformance DynamicLayoutViewChildGeometry + 26
26  com.apple.AttributeGraph        0x00007fff490d55a7 AG::Graph::UpdateStack::update() + 1111
27  com.apple.AttributeGraph        0x00007fff490d5865 AG::Graph::update_attribute(unsigned int, bool) + 377
28  com.apple.AttributeGraph        0x00007fff490d8e6f AG::Graph::input_value_ref_slow(unsigned int, unsigned int, AGTypeID, bool*) + 199
29  com.apple.SwiftUI               0x00007fff425f32b9 LayoutTraitsProxy.layoutTraits() + 41
30  com.apple.SwiftUI               0x00007fff42a5d8e3 accumulateSpacing #1 (ofChild:) in StackLayout.Header.init(layoutContext:proxies:majorAxis:minorAxisAlignment:uniformSpacing:childStorage:capacity:) + 563
31  com.apple.SwiftUI               0x00007fff42a5cd25 StackLayout.Header.init(layoutContext:proxies:majorAxis:minorAxisAlignment:uniformSpacing:childStorage:capacity:) + 805
32  com.apple.SwiftUI               0x00007fff42a5d62d specialized ManagedBufferPointer.init(bufferClass:minimumCapacity:makingHeaderWith:) + 349
33  com.apple.SwiftUI               0x00007fff42a5fc29 specialized closure #2 in HVStack.updateOutput<A>(attributeContext:layoutContext:children:) + 329
34  com.apple.SwiftUI               0x00007fff42a6208a partial apply for specialized  + 42
35  com.apple.SwiftUI               0x00007fff426a8367 specialized static LayoutComputerDelegate.update<A>(_:maybeInPlace:create:) + 247
36  com.apple.SwiftUI               0x00007fff426b6290 specialized static LayoutComputerDelegate.update<A>(_:maybeInPlace:create:) + 16
37  com.apple.SwiftUI               0x00007fff42a5ac8c specialized HVStack.updateOutput<A>(attributeContext:layoutContext:children:) + 220
38  com.apple.SwiftUI               0x00007fff42a5acf0 specialized HVStack.updateOutput<A>(attributeContext:layoutContext:children:) + 48
39  com.apple.SwiftUI               0x00007fff4281a9f6 specialized LayoutQuery<>.update(context:) + 358
40  com.apple.SwiftUI               0x00007fff4293c7ea partial apply for protocol witness for static UntypedAttribute._update(_:graph:attribute:) in conformance DynamicLayoutViewChildGeometry + 26
41  com.apple.AttributeGraph        0x00007fff490d55a7 AG::Graph::UpdateStack::update() + 1111
42  com.apple.AttributeGraph        0x00007fff490d5865 AG::Graph::update_attribute(unsigned int, bool) + 377
43  com.apple.AttributeGraph        0x00007fff490d8e6f AG::Graph::input_value_ref_slow(unsigned int, unsigned int, AGTypeID, bool*) + 199
44  com.apple.SwiftUI               0x00007fff425f32b9 LayoutTraitsProxy.layoutTraits() + 41
45  com.apple.SwiftUI               0x00007fff42a5d8e3 accumulateSpacing #1 (ofChild:) in StackLayout.Header.init(layoutContext:proxies:majorAxis:minorAxisAlignment:uniformSpacing:childStorage:capacity:) + 563
46  com.apple.SwiftUI               0x00007fff42a5cd25 StackLayout.Header.init(layoutContext:proxies:majorAxis:minorAxisAlignment:uniformSpacing:childStorage:capacity:) + 805
47  com.apple.SwiftUI               0x00007fff42a5d62d specialized ManagedBufferPointer.init(bufferClass:minimumCapacity:makingHeaderWith:) + 349
48  com.apple.SwiftUI               0x00007fff42a5fc29 specialized closure #2 in HVStack.updateOutput<A>(attributeContext:layoutContext:children:) + 329
49  com.apple.SwiftUI               0x00007fff42a6208a partial apply for specialized  + 42
50  com.apple.SwiftUI               0x00007fff426a8367 specialized static 

我能做些什么吗?

编辑:创建全新项目时生成的ContentView代码:

import SwiftUI

struct ContentView: View {
    var body: some View {
        Text("Hello World")
    }
}

struct ContentView_Previews: PreviewProvider {
    static var previews: some View {
        ContentView()
    }
}

1 个答案:

答案 0 :(得分:3)

预览画布不适用于Mojave,仅适用于Catalina。 Catalina的当前版本是Beta9。我希望Mojave无法正常运行。如果在Mojave上使用游乐场或在设备上运行,您仍然可以看到SwiftUI的效果。