Xcode Playground無(wú)法執(zhí)行的問(wèn)題:Failed to attach to stub for playground execution
Failed to launch process. Failed to attach to stub for playground execution: error: attach failed ((os/kern) invalid argument)

image.png
原因是在使用M1的芯片的電腦上安裝的Xcode默認(rèn)使用的以 Rosetta 模式啟動(dòng)。解決辦法將Xcode的使用Rosetta打開(kāi)關(guān)掉即可。
找到Xcode App,從右鍵選擇點(diǎn)擊顯示簡(jiǎn)介

image-20211216102227838.png
關(guān)閉使用Rosetta打開(kāi)的選項(xiàng)

image-20211216102336379.png