Xcode 8 beta 模拟器在意外运行 Xcode8 模拟器后无法运行应用程序

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/39856001/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 09:23:39  来源:igfitidea点击:

Xcode 8 beta simulator fails to run app after accidentally running Xcode8 simulator

xcodeconnectionios-simulator

提问by andrei

"Failed to initiate service connection to simulator"

“无法启动与模拟器的服务连接”

Tried to clean app, reinstall it, delete derived data, reset simulator settings, restart xCode. I've also heard other people solved problems with their simulators by recreating the simulator. I tried that as well. When I press create, I get the very same error message: "Error returned in reply: Connection invalid"

试图清理应用程序,重新安装它,删除派生数据,重置模拟器设置,重新启动 xCode。我还听说其他人通过重新创建模拟器解决了他们的模拟器问题。我也试过了。当我按创建时,我收到了相同的错误消息:“回复中返回错误:连接无效”

Failed to initiate service connection  to simulator

无法启动与模拟器的服务连接

回答by Jayprakash Dubey

Even this occurs on Xcode 8.0 stable version.

即使在 Xcode 8.0 稳定版本上也会发生这种情况。

Screenshot 1

截图 1

Got it solved by closing Xcode 7 and its simulator.

通过关闭 Xcode 7 及其模拟器解决了这个问题。

It seems that when you are working on Xcode 8 and its simulator then Xcode 7 simulator should not remain open.

似乎当您使用 Xcode 8 及其模拟器时,Xcode 7 模拟器不应保持打开状态。

Below is screenshot of simulator state for Xcode 7 when you're working on Xcode 8.

下面是您在 Xcode 8 上工作时 Xcode 7 模拟器状态的屏幕截图。

Screenshot 2

截图 2

If fixes like delete derived-data, reset simulator content doesn't works then restart your system.

如果诸如删除派生数据、重置模拟器内容之类的修复程序不起作用,则重新启动系统。

回答by Bryan P

This happens when you try to run a project inXcode 8in simulator mode and the Xcode 7's simulator is still running.

当您尝试Xcode 8在模拟器模式下运行项目并且Xcode 7模拟器仍在运行时,就会发生这种情况。

You only need to close them all(xcode 8, xcode 8 simulator, xcode 7, xcode 7 simulator) then run xcode 8 again.

您只需要关闭它们(xcode 8、xcode 8 模拟器、xcode 7、xcode 7 模拟器)然后再次运行 xcode 8。

It should run properly after that.

之后它应该可以正常运行。

回答by russbishop

Running the Simulator (or CoreSimulator service) from multiple versions of Xcode at the same time is not supported.

不支持同时从多个 Xcode 版本运行模拟器(或 CoreSimulator 服务)。

Be sure you completely close one version of Xcode/Simulator.app before you open a different version.

在打开另一个版本之前,请确保完全关闭一个版本的 Xcode/Simulator.app。

Also be aware that Console.app on Sierra connects to CoreSimulator to present the simulated device's logs. That can keep a connection to CoreSimulator alive when attempting to switch versions.

另请注意,Sierra 上的 Console.app 连接到 CoreSimulator 以显示模拟设备的日志。这可以在尝试切换版本时保持与 CoreSimulator 的连接。

回答by andrei

It seems the problem sorted itself out after I came to work the second day. That means a computer restart fixed it for me

我第二天上班后,问题似乎就解决了。这意味着计算机重新启动为我修复了它