Emi*_*ald 126 xcode ios xcode8
每次我为了测试一些代码而创建一个新游乐场时,Xcode都会卡住并且不会运行代码.它只是在屏幕顶部显示"Running playground"或"Launching simulator"语句,加载图标很可能在它旁边旋转,但没有任何反应.有时这会无限期地继续,有时Xcode会停止并将其打印到控制台:
Playground execution failed: error: Couldn't lookup symbols:
__swift_FORCE_LOAD_$_swiftCoreImage
__swift_FORCE_LOAD_$_swiftFoundation
_playground_log_hidden
_playground_logger_initialize
_playground_log_postprint
thread #1: tid = 0xc0cd0, 0x000000010ea7c3c0 MyPlayground`executePlayground, queue = 'com.apple.main-thread', stop reason = breakpoint 1.2
frame #0: 0x000000010ea7c3c0 MyPlayground`executePlayground
frame #1: 0x000000010ea7b9c0 MyPlayground`__37-[XCPAppDelegate enqueueRunLoopBlock]_block_invoke + 32
frame #2: 0x000000010f59625c CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 12
frame #3: 0x000000010f57b304 CoreFoundation`__CFRunLoopDoBlocks + 356
frame #4: 0x000000010f57aa75 CoreFoundation`__CFRunLoopRun + 901
frame #5: 0x000000010f57a494 CoreFoundation`CFRunLoopRunSpecific + 420
frame #6: 0x0000000114985a6f GraphicsServices`GSEventRunModal + 161
frame #7: 0x0000000110124f34 UIKit`UIApplicationMain + 159
frame #8: 0x000000010ea7b6e9 MyPlayground`main + 201
frame #9: 0x0000000112ad268d libdyld.dylib`start + 1
frame #10: 0x0000000112ad268d libdyld.dylib`start + 1
Run Code Online (Sandbox Code Playgroud)
我在macOS Sierra 10.12上运行Xcode 8.0(8A218a).
硬件:
MacBook Pro(13"2012年中)
2,5 GHz英特尔酷睿i5
4 GB 1600 MHz Ram DDR3
我环顾四周,但至少这些线程都没有提供答案:
https ://forums.developer.apple.com/thread/5902
https://github.com/jas/playground/issues/9
我已经尝试过的事情没有成功:
您对如何解决这个问题有任何想法吗?我是编程新手,急切地想学习Swift,但是Xcode几乎不可能......
提前谢谢,干杯.
PAN*_*RMA 155
答.切换到macOS平台
当您创建Playground时,默认情况下它会选择iOS平台并自动导入UIKit.这是UIKit一直崩溃和卡住.如果您的(练习)代码不使用UIKit,那么您可以切换到MacOS平台.作为主要的iOS和MacOS之间(虽然不是精确的)区别是在了AppKit和UIKit.
在Xcode Playground的右上角,单击显示/隐藏实用程序 - >文件检查器 - >操场设置 - >平台 - > macOS
小智 64
我尝试了以下内容,它对我有用:
Kho*_* Vo 55
在我的情况下,Xcode 8.3.2,当我尝试以下步骤时,它工作:
小智 49
即使在Xcode关闭后,Buggy Simulator的主要流程仍然有效.所以这是步骤:
com.apple.CoreSimulator.CoreSimulatorService在Activity Monitor中杀死进程;小智 20
根据我的经验,你应该:
它工作得很好.
| 归档时间: |
|
| 查看次数: |
72227 次 |
| 最近记录: |