无法在 mac 中启动 iOS 模拟器

Failed to start iOS Simulator in the mac

我有一个 Xamarin.Forms 项目。

我用的是vs2015

今天我把 Xamarin 更新到最新的 version:4.0.0.1697.

当我尝试连接我的 mac 作为 Xamarin Mac 代理时,vs 显示以下消息:

启动代理版本 4.0.0.1697...

无法启动 iOS 中的模拟器 mac

启动 Build 4.0.0.1697 代理时出错:操作超时。

正在启动 Agent Designer 4.0.0.1697...

启动 Designer 4.0.0.1697 代理时出错:操作超时。

Xamarin Mac 代理无法完全启动。代理未启动:IDB 4.0.0.1697、Designer 4.0.0.1697、Build 4.0.0.1697。请查看日志以获取更多详细信息。

所以我无法调试 ios 应用程序。

我不知道下一步该怎么做。

Xamarin.VisualStudio.IOS.Messaging.State.ServerStateContext Information: 0 : [2015-12-07 18:06:14.7579] MacServer State transition from SshConnectingState to SshConnectedState on 192.168.0.207 (192.168.0.207)
Xamarin.VisualStudio.IOS.Messaging.State.ServerStateContext Information: 0 : [2015-12-07 18:06:14.7659] MacServer State transition from SshConnectedState to AgentsStartingState on 192.168.0.207 (192.168.0.207)
Xamarin.VisualStudio.IOS.Messaging.State.ServerStateContext Information: 0 : [2015-12-07 18:06:14.7799] Starting agents on Mac 192.168.0.207 (192.168.0.207)
Xamarin.VisualStudio.IOS.MacServer Information: 0 : [2015-12-07 18:06:14.7959] Activating the Mac...
Xamarin.Messaging.VisualStudio.MessagingService Information: 0 : [2015-12-07 18:06:18.6192] Starting Agent IDB 4.0.0.1697...
Xamarin.VisualStudio.IOS.Messaging.State.ServerStateContext Information: 0 : [2015-12-07 18:06:18.6292] MacServer State transition from AgentsStartingState to LimitedState on 192.168.0.207 (192.168.0.207)
Xamarin.VisualStudio.IOS.Messaging.State.ServerStateContext Information: 0 : [2015-12-07 18:06:18.6352] Connected to the Mac 192.168.0.207 (192.168.0.207) with Limited support.
Xamarin.VisualStudio.IOS.MacServer Error: 0 : [2015-12-07 18:06:29.3798] An error occured starting the IDB 4.0.0.1697 agent: The operation has timed out.

System.TimeoutException: The operation has timed out.
   at Xamarin.Messaging.Client.Ssh.AgentCommands.StartAgent(AgentInfo agent, Int32 port, Int32 timeout, Boolean debugMode, String[] extraArgs)
   at Xamarin.Messaging.VisualStudio.MessagingService.StartAgent(AgentInfo agentInfo, Boolean restartAutomatically)
   at Xamarin.VisualStudio.IOS.MacServer.StartAgent(AgentInfo agentInfo) in C:\Users\builder\data\lanes11\deffc901\source\XamarinVS\src\Core\VisualStudio.IOS\Messaging\MacServer.cs:line 366
Xamarin.Messaging.VisualStudio.MessagingService Information: 0 : [2015-12-07 18:06:29.9288] Starting Agent Build 4.0.0.1697...
Xamarin.VisualStudio.IOS.MacServer Error: 0 : [2015-12-07 18:06:31.4349] An error occured starting the Build 4.0.0.1697 agent: Xamarin Information: 0 : Xamarin - 4.0.0.1697-cycle6-baseline+deffc90
Xamarin.Messaging.Client.AgentConsoleRunner Information: 0 : Starting Build 4.0.0.1697...
Xamarin.Messaging.Build.BuildAgent Information: 0 : Starting Agent: Build 4.0.0.1697
Xamarin.Messaging.Build.BuildAgent Information: 0 : Build 4.0.0.1697 agent started
Failed-The classes in the module cannot be loaded.


Xamarin.Messaging.Exceptions.MessagingException: Xamarin Information: 0 : Xamarin - 4.0.0.1697-cycle6-baseline+deffc90
Xamarin.Messaging.Client.AgentConsoleRunner Information: 0 : Starting Build 4.0.0.1697...
Xamarin.Messaging.Build.BuildAgent Information: 0 : Starting Agent: Build 4.0.0.1697
Xamarin.Messaging.Build.BuildAgent Information: 0 : Build 4.0.0.1697 agent started
Failed-The classes in the module cannot be loaded.

我经常遇到 Xamarin Mac Agent 和 Visual Studio 运行 on Parallels 的问题(目前我来这里的原因)。但是,有时 遵循本指南中的故障排除步骤会有所帮助,但并非总是如此。

我怀疑我的问题更深层次 - 你的问题可能会有所帮助 link。

https://developer.xamarin.com/guides/ios/getting_started/installation/windows/xamarin-mac-agent/xma-troubleshooting/

因此,如果有人偶然发现了这个问题,可以尝试一些方法。

当然还有三个R的Restart Reboot和Reinstall

重新启动 Visual Studio 和 xcode。 重新启动所有涉及的电脑,Build 代理有时会进入奇怪的状态,重新启动会清除它们并让您重新开始 为了更好的措施,请在使用路由器时重新启动路由器,并确保您的 IP 地址与您假设的一样。

然后Update\Reinstall。如果 mac 上的 xcode 已更新,您可能需要在 VS 中更新 Xamarin 才能建立连接或 Mac.

上的 Xamarin Studio 更新

三个都打开 Xcode、Xamarin Studio 上 Mac 和 VisualStudio 并确保所有 3 个都已更新。 当您在 Xcode 时,继续创建一个新项目并 运行 它。查看模拟器是否从 XCode 中出现,或者您是否收到接受许可等的提示。

如果更新没有修复或不更新,可能需要重新安装 Xcode。

毕竟,如果它仍然不起作用,您可以在墨西哥的海滩上使用 PBR 将脚趾放入水中,将 3 澳元放入沙子中。这解决了一切。

我通过更新与 Visual Studio 相同的 Xamarin.iOS 版本解决了这个问题。 然后我在Mac中成功运行我的App。 感谢所有关注我问题的人。

所以我运行陷入了这个问题。这让我发疯。

我的问题是我使用 Mac 只是为了能够启动应用程序。否则,它只是闲置。问题出在我的 mac 上的 'Energy Saver' 设置是在选中 "Put hard disks to sleep when possible" 的情况下设置的。这就是我的案例失败的原因。 检查 'Wake for network access' 也可能更好。