简体   繁体   English

Xcode 7 beta 4 构建错误 - com.apple.CoreSimulator.SimRuntime.iOS-9-0

[英]Xcode 7 beta 4 build error - com.apple.CoreSimulator.SimRuntime.iOS-9-0

The error I get when building a previously working project:我在构建以前工作的项目时遇到的错误:

Images.xcassets: Failed to find a suitable device for the type SimDeviceType : com.apple.CoreSimulator.SimDeviceType.iPad-2 with runtime SimRuntime : 9.0 (13A4305g) - com.apple.CoreSimulator.SimRuntime.iOS-9-0 Images.xcassets:无法找到适合 SimDeviceType 类型的设备:com.apple.CoreSimulator.SimDeviceType.iPad-2 with runtime SimRuntime : 9.0 (13A4305g) - com.apple.CoreSimulator.SimRuntime.iOS-9-0

I've removed all references of Xcode and all simulators on my mac, restarted it so many times I can't count.我已经删除了我的 mac 上所有对 Xcode 和所有模拟器的引用,重新启动它的次数我数不清了。 This happened after the last release of El Capitan 2 days ago.这发生在 2 天前最后一次发布 El Capitan 之后。 The project was building and running fine before.. Why would the error originate from the Images.xcassets in the first place?该项目之前构建和运行良好......为什么错误首先来自Images.xcassets?

I can see xcode 7 beta 4 has all the simulators included in its package, but the list of available simulators is empty.我可以看到 xcode 7 beta 4 的包中包含所有模拟器,可用模拟器列表是空的。 To be noted I just want to run my project on a physical device and not the simulator (which freezes when open)请注意,我只想在物理设备上运行我的项目,而不是模拟器(打开时会冻结)

Log from the CoreSimulator that's been showing since the moment I upgraded OSX:自从我升级 OSX 以来一直显示的 CoreSimulator 的日志:

Jul 22 14:53:53 CoreSimulatorService[787] : com.apple.CoreSimulator.CoreSimulatorService 166~1 starting. 7 月 22 日 14:53:53 CoreSimulatorService[787]:com.apple.CoreSimulator.CoreSimulatorService 166~1 开始。

Managed to narrow it down to removing all the images from the Images.xcassets and adding an AppIcon and a LaunchImage to that.设法缩小范围以从 Images.xcassets 中删除所有图像并添加一个 AppIcon 和一个 LaunchImage。 Builds ok, but whenever I attempt to add any other Image the build will fail again with the same error as mentioned above.构建正常,但是每当我尝试添加任何其他图像时,构建都会再次失败,并出现与上述相同的错误。 It only builds if the images are left empty with no associated png files.仅当图像为空且没有关联的 png 文件时才会构建。 Why though?为什么?

Try Delete all the files in these two path尝试删除这两个路径中的所有文件

rm -rf ~/Library/Developer/CoreSimulator
rm -rf ~/Library/Developer/Xcode

The official discussion of a related issue is in Apple's forums , but people confuse both issues since they have similar characteristics.相关问题的官方讨论是在Apple 的论坛中,但人们将这两个问题混淆,因为它们具有相似的特征。

The current El Capitan Beta has a bug which causes issues loading dyld_sim from older versions of the iOS Simulator in El Capitan.当前的 El Capitan Beta 有一个错误,导致在 El Capitan 中从旧版本的 iOS 模拟器加载 dyld_sim 时出现问题。

Previous versions of El Capitan Beta had a different bug which caused CoreSimulatorService to crash (and thus limit simulator availability) if you had older legacy runtimes installed to /Library/Developer/CoreSimulator.如果您将较旧的旧版运行时安装到 /Library/Developer/CoreSimulator,之前版本的 El Capitan Beta 有一个不同的错误,该错误会导致 CoreSimulatorService 崩溃(从而限制模拟器可用性)。

The workaround discussed in the forum post will work around both issues:论坛帖子中讨论的解决方法将解决这两个问题:

sudo xcode-select -s /path/to/Xcode-beta.app  
[[ -d /Library/Developer/CoreSimulator ]] && sudo mv /Library/Developer/CoreSimulator{,.bak}  
sudo mv $(xcrun --sdk iphonesimulator --show-sdk-path)/usr/lib/dyld_sim{,.bak}  
sudo mv $(xcrun --sdk watchsimulator --show-sdk-path)/usr/lib/dyld_sim{,.bak}  

Updating Xcode in the future will "undo" the change to Xcode.app.将来更新 Xcode 将“撤消”对 Xcode.app 的更改。 The newest Xcode.app beta, which was released after the El Capitan Beta, is not affected by this bug.在 El Capitan Beta 之后发布的最新 Xcode.app 测试版不受此错误的影响。

In the future, after a new El Capitan beta is released and you have updated, you will want to restore /Library/Developer/CoreSimulator if you moved it aside:将来,在新的 El Capitan 测试版发布并更新后,如果将 /Library/Developer/CoreSimulator 移到一边,您将需要恢复它:

[[ -d /Library/Developer/CoreSimulator.bak ]] && sudo mv /Library/Developer/CoreSimulator{.bak,}  

Following the instructions here: support.apple.com/en-us/HT201314 , reinstall OSX using Recovery.按照此处的说明进行操作: support.apple.com/en-us/HT201314 ,使用 Recovery 重新安装 OSX。 Before you do that, remove all Xcode references.在执行此操作之前,请删除所有 Xcode 引用。 After the os installation, reinstall Xcode and the project should be building just fine.安装 os 后,重新安装 Xcode,项目应该可以正常构建。

暂无
暂无

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

相关问题 创建新的模拟器命令行-无效的运行时:com.apple.CoreSimulator.SimRuntime.iOS-13 - Creating New Simulator Command Line- Invalid runtime: com.apple.CoreSimulator.SimRuntime.iOS-13 XCode 6 Beta 4错误 - “运行时遇到错误(Domain = com.apple.CoreSimulator.SimError,Code = 146)” - XCode 6 Beta 4 error - “An error was encountered while running (Domain = com.apple.CoreSimulator.SimError, Code = 146)” Apple WeatherKit 错误 Xcode 14 Beta 5 iOS 16 - Apple WeatherKit Error Xcode 14 Beta 5 iOS 16 离子模拟ios(domain = com.apple.CoreSimulator.SimError,code = 163) - ionic emulate ios (domain=com.apple.CoreSimulator.SimError, code=163) iPhone 8和X的模拟器错误:无法查找服务com.apple.CoreSimulator.host_support:0x3 - Simulator error for iPhone 8 and X : Unable to lookup service com.apple.CoreSimulator.host_support: 0x3 Xamarin.iOS错误:未安装Apple iOS SDK。 (iOS9,XCode 7 Beta) - Xamarin.iOS Error: The Apple iOS SDK is not installed. (iOS9, XCode 7 beta) Xcode 7 beta - 构建错误(xcassets) - Xcode 7 beta - build error (xcassets) 无法使用Xcode 7 Beta构建iOS应用 - Can't build iOS app with Xcode 7 beta iOS App Entitlement'com.apple.developer.payment-pass-provisioning'未在Xcode 9中构建 - iOS App Entitlement 'com.apple.developer.payment-pass-provisioning' does not get incorporated in build in Xcode 9 Xcode 10 beta 6错误:访问构建数据库 - Xcode 10 beta 6 error: accessing build database
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM