简体   繁体   English

iOS模拟器仅显示空白屏幕

[英]iOS Simulator showing only blank screen

I have upgraded few of my macminis to El Capitan 10.11.2 and installed Xcode 7.1. 我已经将少数Macmini升级到El Capitan 10.11.2,并安装了Xcode 7.1。 But iOS Simulator is showing some problem. 但是iOS模拟器显示了一些问题。 Like, default iOS of Xcode 7.1 is 9.1 and when i launch any device in iOS simulator from SDK 9.1, it just shows me a black screen. 就像Xcode 7.1的默认iOS是9.1,当我从SDK 9.1在iOS模拟器中启动任何设备时,它只会显示黑屏。

So to check that, i went to Xcode > Preferences and Downloaded SDK 9.0 and 8.4. 因此要检查,我去了Xcode> Preferences并下载了SDK 9.0和8.4。 When i switch to any device from SDK 9.0 or 8.4, they work fine. 当我从SDK 9.0或8.4切换到任何设备时,它们都可以正常工作。 But i don't know what is going on with its default SDK 9.1. 但是我不知道默认的SDK 9.1是怎么回事。

I tried below of the stuff to troubleshoot the issue. 我在下面尝试了一些方法来解决此问题。

  1. Reinstall Xcode. 重新安装Xcode。
  2. Reset Device contents. 重置设备内容。
  3. Removed Devices folders and created devices again under SDK 9.1. 删除了设备文件夹,并在SDK 9.1下再次创建了设备。
  4. Deleted and re-created /private/tmp/ with correct permissions. 删除并使用正确的权限重新创建/ private / tmp /。
  5. Some more. 多一点。

None of them worked. 他们都没有工作。

I have pasted some logs of CoreSimulator.log fine when i switch to any device under SDK 9.1. 当我切换到SDK 9.1下的任何设备时,我已经很好地粘贴了CoreSimulator.log的一些日志。

CoreSimulator.log CoreSimulator.log

Jan 10 21:45:21  CoreSimulatorService[331] : Error looking up host support port
Jan 10 21:45:21  CoreSimulatorService[331] : Error Domain=com.apple.CoreSimulator.SimError Code=159 "Invalid device state" UserInfo={NSLocalizedDescription=Invalid device state}
Jan 10 21:45:21  CoreSimulatorService[331] : Error Domain=NSPOSIXErrorDomain Code=3 "No such process"
Jan 10 21:45:21  CoreSimulatorService[331] : Error looking up host support port
Jan 10 21:45:21  CoreSimulatorService[331] : Error Domain=com.apple.CoreSimulator.SimError Code=159 "Invalid device state" UserInfo={NSLocalizedDescription=Invalid device state}
Jan 10 21:45:21  CoreSimulatorService[331] : Error Domain=NSPOSIXErrorDomain Code=3 "No such process"
Jan 10 21:45:21  CoreSimulatorService[331] : Error Domain=NSPOSIXErrorDomain Code=3 "No such process"
Jan 10 21:45:21  CoreSimulatorService[331] : Error Domain=NSPOSIXErrorDomain Code=3 "No such process"
Jan 10 21:45:21  CoreSimulatorService[331] : Error Domain=NSPOSIXErrorDomain Code=3 "No such process"
Jan 10 21:45:21  com.apple.iphonesimulator[447] : Error looking up host support port
Jan 10 21:45:21  com.apple.iphonesimulator[447] : Error looking up host support port
Jan 10 21:45:21  com.apple.iphonesimulator[447] : Error looking up host support port

Simulator.log File Simulator.log文件

Jan 10 20:56:58  Simulator[381] : Error communicating with SimulatorBridge: NSObjectNotAvailableException - Unable to connect to SimulatorBridge
Jan 10 20:56:58  Simulator[381] : Error communicating with SimulatorBridge: NSObjectNotAvailableException - Unable to connect to SimulatorBridge
Jan 10 20:59:39  Simulator[416] : Error communicating with SimulatorBridge: NSObjectNotAvailableException - Unable to connect to SimulatorBridge
Jan 10 20:59:39  Simulator[416] : Error communicating with SimulatorBridge: NSObjectNotAvailableException - Unable to connect to SimulatorBridge
Jan 10 21:00:21  Simulator[429] : Error communicating with SimulatorBridge: NSObjectNotAvailableException - Unable to connect to SimulatorBridge
Jan 10 21:00:21  Simulator[429] : Error communicating with SimulatorBridge: NSObjectNotAvailableException - Unable to connect to SimulatorBridge
Jan 10 21:02:45  Simulator[447] : Error communicating with SimulatorBridge: NSObjectNotAvailableException - Unable to connect to SimulatorBridge
Jan 10 21:02:45  Simulator[447] : Error communicating with SimulatorBridge: NSObjectNotAvailableException - Unable to connect to SimulatorBridge
Jan 10 21:14:06  Simulator[447] : Error communicating with SimulatorBridge: NSObjectNotAvailableException - Unable to connect to SimulatorBridge
Jan 10 21:14:06  Simulator[447] : Error communicating with SimulatorBridge: NSObjectNotAvailableException - Unable to connect to SimulatorBridge
Jan 10 21:45:21  Simulator[447] : Error communicating with SimulatorBridge: NSObjectNotAvailableException - Unable to connect to SimulatorBridge
Jan 10 21:45:21  Simulator[447] : Error communicating with SimulatorBridge: NSObjectNotAvailableException - Unable to connect to SimulatorBridge

Quit the xcode and kill the pid also and also close and quit the simulator. 退出xcode并杀死pid,然后关闭并退出模拟器。 Again lunch the xcode and go to window-->divices--> remove all the device and add it agin it will works . 再次午餐xcode并转到窗口-> divices->删除所有设备并重新添加它,它将起作用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM