Images.xcassets: error: Failed to find a suitable device for the type SimDeviceType

Images.xcassets: error: Failed to find a suitable device for the type SimDeviceType

当我尝试在模拟器中 运行 应用程序时,我持有 Xcode 8.3.2 和 Xcode 9 beta 1,我的项目 运行ning 在 Xcode 8.3.2。我收到以下错误。

Images.xcassets: error: Failed to find a suitable device for the type SimDeviceType : com.apple.dt.Xcode.IBSimDeviceType.iPad-2x with runtime SimRuntime : 10.3 (14E269) - com.apple.CoreSimulator.SimRuntime.iOS-10-3
    Failure Reason: Failed to create SimDeviceSet at path /Users/Mac/Library/Developer/Xcode/UserData/IB Support/Simulator Devices. You'll want to check the logs in ~/Library/Logs/CoreSimulator to see why creating the SimDeviceSet failed.
    Underlying Errors:
        Description: Failed to initialize simulator device set.
        Failure Reason: Failed to subscribe to notifications from CoreSimulatorService.
        Underlying Errors:
            Description: Error returned in reply to notification request: Connection invalid
            Failure Reason: Software caused connection abort
/* com.apple.actool.document.notices */

尝试清理项目,然后运行我就是这么做的

转到产品 > 清洁,然后 运行

我遇到了这个错误,只需从 Xcode 菜单中打开模拟器即可解决。

Xcode -> Open Developer Tool -> Simulator

模拟器打开并完成启动后,我清理并重建了项目。

对我来说,它没有帮助清洁。我必须 运行 sudo killall -9 com.apple.CoreSimulator.CoreSimulatorService 然后我可以通过模拟器启动应用程序