I want to use a playground in Xcode 6.0.1. So File -> New -> Playground
我想在Xcode 6.0.1中使用一个游乐场。所以文件 - >新 - >游乐场
I get immediately the error. Playground execution terminated because the playground process exited unexpectedly. See image. Restart Xcode didn't helped.
我马上得到错误。游乐场执行终止,因为游乐场进程意外退出。见图。重启Xcode没有帮助。
Whats wrong with Xcode?
Xcode有什么问题?
11 个解决方案
#1
29
New Answer:
新答案:
As @Woomin points out in the comments, first try restarting Xcode and rebooting your Mac, and if that fails try the following:
正如@Woomin在评论中指出的那样,首先尝试重新启动Xcode并重新启动Mac,如果失败,请尝试以下操作:
Try deleting the .simruntime files:
尝试删除.simruntime文件:
I found them located here in my root directory:
我发现它们位于我的根目录中:
Old Answer:
旧答案:
If the above doesn't work try removing everything in the Developer
folder located at /Library/Developer/
. If this still doesn't work try removing everything in ~/Library/Developer/
. If this still doesn't solve it remove xcode with AppCleaner and reinstall it using the MAS version. I found that doing this last thing solved the issue but it came back when I installed the simulators from xcode's download tab. Removing the .simruntime files finally solved it for me. BTW, I'm using version 7.2.
如果以上操作无效,请尝试删除位于/ Library / Developer /的Developer文件夹中的所有内容。如果这仍然无效,请尝试删除〜/ Library / Developer /中的所有内容。如果仍然无法解决,请使用AppCleaner删除xcode并使用MAS版本重新安装。我发现做最后这件事解决了这个问题,但是当我从xcode的下载选项卡安装模拟器时它又回来了。删除.simruntime文件终于解决了它。顺便说一句,我使用的是7.2版本。
#2
8
A restart of the mac solves the problem. What causes the issue is still unknown.
重新启动mac可以解决问题。造成这个问题的原因尚不清楚。
#3
3
Thanks smileBot's answer. I am able to make it work with 7.2 too. I did try differently.
谢谢smileBot的回答。我也可以使用7.2。我尝试过不同的尝试。
I installed Xcode 7.2 release version via downloading. However it had problem mentioned above. I first deleted the Xcode 7.2 via AppCleaner completely. Empty the trash. Also cleaned the derived data using WatchDog for Xcode And then restart the machine. Try again, it did not work.
我通过下载安装了Xcode 7.2发行版。但是它有上面提到的问题。我首先完全通过AppCleaner删除了Xcode 7.2。清空垃圾。还使用WatchDog for Xcode清除派生数据然后重新启动计算机。再试一次,它没用。
So I went ahead deleted the folder ~/Library/Developer/
and then restart, try again, I can use Playground again in Xcode 7.2 again.
所以我继续删除文件夹〜/ Library / Developer /然后重新启动,再试一次,我可以再次在Xcode 7.2中使用Playground。
#4
1
Xcode 7.2 and Mac os x 10.11.2 Restart Xcode or mac does not worked for me. I solve this problem is that delete the Simulator Profiles. The Path is ~/Library/Developer/CoreSimulator/Profiles/Runtimes. Delete all Runtimes. Than Restart the Xcode, problem has been solved.
Xcode 7.2和Mac os x 10.11.2重新启动Xcode或mac对我不起作用。我解决这个问题就是删除模拟器配置文件。 Path是〜/ Library / Developer / CoreSimulator / Profiles / Runtimes。删除所有运行时。比重启Xcode,问题已经解决了。
#5
0
Install Command line tools using command
使用命令安装命令行工具
xcode-select --install
xcode-select --install
then u will get an update in Appstore install that app Problem will be solved.
那么你将在Appstore安装中得到更新app该问题将得到解决。
#6
0
OSX 10.11.2 and Xcode 7.2
OSX 10.11.2和Xcode 7.2
I had gotten a reply to his from a member on the Apple Developer Forum and wanted to provide some additional information on my fix for this. First I deleted the ~/Library/Developer
folder as indicated. Looking into it it had the some Simulator Profiles
. I didn't know what that had to do with the Playground issue so I did NOT empty the Trash. I rebooted and the playground worked.
我从Apple开发者论坛的一位成员那里得到了他的答复,并希望提供一些关于我的修复的额外信息。首先,我删除了〜/ Library / Developer文件夹,如图所示。调查它有一些模拟器配置文件。我不知道与Playground问题有什么关系,所以我没有清空垃圾桶。我重新启动,游乐场工作。
I put back the folder and the playground had the issues again. I one by one removed the simulator profiles in the sub directory ultimately removing ALL of the profiles without deleting the ~/Library/Developer
folder structure and the Playground works.
我放回文件夹,操场再次出现问题。我逐个删除子目录中的模拟器配置文件,最终删除所有配置文件,而不删除〜/ Library / Developer文件夹结构和Playground工作。
#7
0
With Xcode 7.2 (7C68) i had the same problem. I'd solve it by changing the entry of the runtime value from com.apple.CoreSimulator.SimRuntime.iOS-9-1 to com.apple.CoreSimulator.SimRuntime.iOS-9-2. I'd changed it in the device.plist. In ~/Library/Developer/CoreSimulator/XCPGDevices/ is one or more folder with a UUID as name. In one of this folders is the current device.plist.
使用Xcode 7.2(7C68)我遇到了同样的问题。我将通过将运行时值从com.apple.CoreSimulator.SimRuntime.iOS-9-1的条目更改为com.apple.CoreSimulator.SimRuntime.iOS-9-2来解决此问题。我在device.plist中更改了它。在〜/ Library / Developer / CoreSimulator / XCPGDevices /中是一个或多个UUID作为名称的文件夹。其中一个文件夹是当前的device.plist。
#8
0
It's not necessary to delete manually Developer's folder. Just follow this steps in Command Line (CL).
没有必要手动删除Developer的文件夹。只需在命令行(CL)中执行此步骤即可。
Quit Xcode.app, Simulator.app and all Xcode related and then in CL:
退出Xcode.app,Simulator.app和所有Xcode相关,然后在CL中:
sudo killall -9 com.apple.CoreSimulator.CoreSimulatorService
rm -rf ~/Library/*/CoreSimulator
#9
0
A restart of Xcode solves the problem , most of the times . (Do remember to quit from the dock too)
重启Xcode解决了这个问题,大部分时间都是如此。 (还记得从码头上退出)
If that doesn't work a restart of Mac is all that is required
如果这不起作用,则只需重启Mac即可
#10
0
This happened to me and I found that the platform setting wasn't set for my playground. Probably because the playground was created in a previous version of XCode which didn't require it.
这发生在我身上,我发现没有为我的操场设置平台设置。可能是因为操场是在以前版本的XCode中创建的,并不需要它。
Solution:
解:
Double click on your playground to open it in XCode and wait for the fail message. Dismiss the message (it may appear more than once) and do the following
双击您的操场,在XCode中打开它,等待失败消息。关闭消息(可能会出现多次)并执行以下操作
1.Select to show the project navigator pane.
1.选择以显示项目导航器窗格。
2.Select the workspace in the navigator.
2.在导航器中选择工作区。
3.Select to show the Utilities pane.
3.选择以显示“实用工具”窗格。
4.In the playground settings area of the Identity inspector. Select OSX (or iOS)
4.在Identity检查器的操场设置区域中。选择OSX(或iOS)
#11
-2
It is ok when Change the platform to "OS X" from inspector, but problem when back to "iOS". I don't know why...in Xcode7 Beta.
从检查员将平台更改为“OS X”时可以,但返回“iOS”时出现问题。我不知道为什么......在Xcode7 Beta中。
Plus, it is ok in my Xcode 6.4 for both platform when playground.
另外,在游乐场时,我的Xcode 6.4适用于两个平台。
And there is one more option for iOS platform "Run in Full Simulator",besides "Render Documentation"option. in My Xcode 6.4 inspector
除了“渲染文档”选项之外,iOS平台还有一个选项“Run in Full Simulator”。在我的Xcode 6.4检查器中
and I have check the "IDEPlaygroundSettings.inspector" in
我已经检查了“IDEPlaygroundSettings.inspector”
/Applications/Xcode.app/Contents//PlugIns/IDELanguageSupportUI.ideplugin/Contents/Resources/IDEPlaygroundSettings.inspector
/Applications/Xcode.app/Contents//PlugIns/IDELanguageSupportUI.ideplugin/Contents/Resources/IDEPlaygroundSettings.inspector
and
和
/Applications/Xcode-Beta.app/Contents//PlugIns/IDELanguageSupportUI.ideplugin/Contents/Resources/IDEPlaygroundSettings.inspector
/Applications/Xcode-Beta.app/Contents//PlugIns/IDELanguageSupportUI.ideplugin/Contents/Resources/IDEPlaygroundSettings.inspector
they are quite different.
他们是完全不同的。
#1
29
New Answer:
新答案:
As @Woomin points out in the comments, first try restarting Xcode and rebooting your Mac, and if that fails try the following:
正如@Woomin在评论中指出的那样,首先尝试重新启动Xcode并重新启动Mac,如果失败,请尝试以下操作:
Try deleting the .simruntime files:
尝试删除.simruntime文件:
I found them located here in my root directory:
我发现它们位于我的根目录中:
Old Answer:
旧答案:
If the above doesn't work try removing everything in the Developer
folder located at /Library/Developer/
. If this still doesn't work try removing everything in ~/Library/Developer/
. If this still doesn't solve it remove xcode with AppCleaner and reinstall it using the MAS version. I found that doing this last thing solved the issue but it came back when I installed the simulators from xcode's download tab. Removing the .simruntime files finally solved it for me. BTW, I'm using version 7.2.
如果以上操作无效,请尝试删除位于/ Library / Developer /的Developer文件夹中的所有内容。如果这仍然无效,请尝试删除〜/ Library / Developer /中的所有内容。如果仍然无法解决,请使用AppCleaner删除xcode并使用MAS版本重新安装。我发现做最后这件事解决了这个问题,但是当我从xcode的下载选项卡安装模拟器时它又回来了。删除.simruntime文件终于解决了它。顺便说一句,我使用的是7.2版本。
#2
8
A restart of the mac solves the problem. What causes the issue is still unknown.
重新启动mac可以解决问题。造成这个问题的原因尚不清楚。
#3
3
Thanks smileBot's answer. I am able to make it work with 7.2 too. I did try differently.
谢谢smileBot的回答。我也可以使用7.2。我尝试过不同的尝试。
I installed Xcode 7.2 release version via downloading. However it had problem mentioned above. I first deleted the Xcode 7.2 via AppCleaner completely. Empty the trash. Also cleaned the derived data using WatchDog for Xcode And then restart the machine. Try again, it did not work.
我通过下载安装了Xcode 7.2发行版。但是它有上面提到的问题。我首先完全通过AppCleaner删除了Xcode 7.2。清空垃圾。还使用WatchDog for Xcode清除派生数据然后重新启动计算机。再试一次,它没用。
So I went ahead deleted the folder ~/Library/Developer/
and then restart, try again, I can use Playground again in Xcode 7.2 again.
所以我继续删除文件夹〜/ Library / Developer /然后重新启动,再试一次,我可以再次在Xcode 7.2中使用Playground。
#4
1
Xcode 7.2 and Mac os x 10.11.2 Restart Xcode or mac does not worked for me. I solve this problem is that delete the Simulator Profiles. The Path is ~/Library/Developer/CoreSimulator/Profiles/Runtimes. Delete all Runtimes. Than Restart the Xcode, problem has been solved.
Xcode 7.2和Mac os x 10.11.2重新启动Xcode或mac对我不起作用。我解决这个问题就是删除模拟器配置文件。 Path是〜/ Library / Developer / CoreSimulator / Profiles / Runtimes。删除所有运行时。比重启Xcode,问题已经解决了。
#5
0
Install Command line tools using command
使用命令安装命令行工具
xcode-select --install
xcode-select --install
then u will get an update in Appstore install that app Problem will be solved.
那么你将在Appstore安装中得到更新app该问题将得到解决。
#6
0
OSX 10.11.2 and Xcode 7.2
OSX 10.11.2和Xcode 7.2
I had gotten a reply to his from a member on the Apple Developer Forum and wanted to provide some additional information on my fix for this. First I deleted the ~/Library/Developer
folder as indicated. Looking into it it had the some Simulator Profiles
. I didn't know what that had to do with the Playground issue so I did NOT empty the Trash. I rebooted and the playground worked.
我从Apple开发者论坛的一位成员那里得到了他的答复,并希望提供一些关于我的修复的额外信息。首先,我删除了〜/ Library / Developer文件夹,如图所示。调查它有一些模拟器配置文件。我不知道与Playground问题有什么关系,所以我没有清空垃圾桶。我重新启动,游乐场工作。
I put back the folder and the playground had the issues again. I one by one removed the simulator profiles in the sub directory ultimately removing ALL of the profiles without deleting the ~/Library/Developer
folder structure and the Playground works.
我放回文件夹,操场再次出现问题。我逐个删除子目录中的模拟器配置文件,最终删除所有配置文件,而不删除〜/ Library / Developer文件夹结构和Playground工作。
#7
0
With Xcode 7.2 (7C68) i had the same problem. I'd solve it by changing the entry of the runtime value from com.apple.CoreSimulator.SimRuntime.iOS-9-1 to com.apple.CoreSimulator.SimRuntime.iOS-9-2. I'd changed it in the device.plist. In ~/Library/Developer/CoreSimulator/XCPGDevices/ is one or more folder with a UUID as name. In one of this folders is the current device.plist.
使用Xcode 7.2(7C68)我遇到了同样的问题。我将通过将运行时值从com.apple.CoreSimulator.SimRuntime.iOS-9-1的条目更改为com.apple.CoreSimulator.SimRuntime.iOS-9-2来解决此问题。我在device.plist中更改了它。在〜/ Library / Developer / CoreSimulator / XCPGDevices /中是一个或多个UUID作为名称的文件夹。其中一个文件夹是当前的device.plist。
#8
0
It's not necessary to delete manually Developer's folder. Just follow this steps in Command Line (CL).
没有必要手动删除Developer的文件夹。只需在命令行(CL)中执行此步骤即可。
Quit Xcode.app, Simulator.app and all Xcode related and then in CL:
退出Xcode.app,Simulator.app和所有Xcode相关,然后在CL中:
sudo killall -9 com.apple.CoreSimulator.CoreSimulatorService
rm -rf ~/Library/*/CoreSimulator
#9
0
A restart of Xcode solves the problem , most of the times . (Do remember to quit from the dock too)
重启Xcode解决了这个问题,大部分时间都是如此。 (还记得从码头上退出)
If that doesn't work a restart of Mac is all that is required
如果这不起作用,则只需重启Mac即可
#10
0
This happened to me and I found that the platform setting wasn't set for my playground. Probably because the playground was created in a previous version of XCode which didn't require it.
这发生在我身上,我发现没有为我的操场设置平台设置。可能是因为操场是在以前版本的XCode中创建的,并不需要它。
Solution:
解:
Double click on your playground to open it in XCode and wait for the fail message. Dismiss the message (it may appear more than once) and do the following
双击您的操场,在XCode中打开它,等待失败消息。关闭消息(可能会出现多次)并执行以下操作
1.Select to show the project navigator pane.
1.选择以显示项目导航器窗格。
2.Select the workspace in the navigator.
2.在导航器中选择工作区。
3.Select to show the Utilities pane.
3.选择以显示“实用工具”窗格。
4.In the playground settings area of the Identity inspector. Select OSX (or iOS)
4.在Identity检查器的操场设置区域中。选择OSX(或iOS)
#11
-2
It is ok when Change the platform to "OS X" from inspector, but problem when back to "iOS". I don't know why...in Xcode7 Beta.
从检查员将平台更改为“OS X”时可以,但返回“iOS”时出现问题。我不知道为什么......在Xcode7 Beta中。
Plus, it is ok in my Xcode 6.4 for both platform when playground.
另外,在游乐场时,我的Xcode 6.4适用于两个平台。
And there is one more option for iOS platform "Run in Full Simulator",besides "Render Documentation"option. in My Xcode 6.4 inspector
除了“渲染文档”选项之外,iOS平台还有一个选项“Run in Full Simulator”。在我的Xcode 6.4检查器中
and I have check the "IDEPlaygroundSettings.inspector" in
我已经检查了“IDEPlaygroundSettings.inspector”
/Applications/Xcode.app/Contents//PlugIns/IDELanguageSupportUI.ideplugin/Contents/Resources/IDEPlaygroundSettings.inspector
/Applications/Xcode.app/Contents//PlugIns/IDELanguageSupportUI.ideplugin/Contents/Resources/IDEPlaygroundSettings.inspector
and
和
/Applications/Xcode-Beta.app/Contents//PlugIns/IDELanguageSupportUI.ideplugin/Contents/Resources/IDEPlaygroundSettings.inspector
/Applications/Xcode-Beta.app/Contents//PlugIns/IDELanguageSupportUI.ideplugin/Contents/Resources/IDEPlaygroundSettings.inspector
they are quite different.
他们是完全不同的。