无法使用Xcode 12.0 beta 5构建项目 [英] Cannot build project with Xcode 12.0 beta 5

查看:70
本文介绍了无法使用Xcode 12.0 beta 5构建项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我下载了Xcode 12.0 beta 5,并尝试构建我的项目,但收到以下错误:

 < unknown>:0:错误:无法加载目标'arm64-apple-ios9.0'的标准库 

我尝试在线搜索解决方案,但是发现的任何内容都无法帮助我解决此错误.我发现

  1. 禁用这些方案设置(在工具栏的编辑方案"中)以及主线程检查器".这是Xcode中许多构建/运行时错误的解决方法.

  1. 此外,我会检查您是否将新的构建系统用于Pod和应用程序目标的构建设置.这里的设置冲突可能是问题所在.摘自Xcode 12 Beta发行说明:

旧版构建系统已弃用,以后将被删除释放.(62742902)

对于每个步骤,请确保清除派生数据"并重建.在两次尝试之间重新启动Xcode也是一个好主意.如果这7条建议中的任何一条都不奏效,那么我建议您在反馈助手"上提出一张故障单.Xcode在Beta阶段经历了许多快速的改进,因此可能会有一些意想不到的行为.

I downloaded Xcode 12.0 beta 5 and I'm trying to build my project, but I received the following error:

<unknown>:0: error: unable to load standard library for target 'arm64-apple-ios9.0'

I tried searching online for solutions, but none of what I found helped me to solve this error. I found this thread on SO but none of the proposed solutions worked for me.

I think it's an error related to simulator. In fact, the project builds correctly with generic device and on a real device.

解决方案

Your error message is quite minimal but shows that you're trying to build for iOS 9.0 - I would check your Build Report in the navigator for a more helpful error message. I have a few hunches about the issue:

  1. The Xcode 12 Beta 6 Release Notes include new "deprecations" which only support specific iOS Simulator versions:

Deprecations When running in macOS 11, Simulator supports iOS 11.4 or later. (59938106)

However, building for device supports iOS 9 and above:

Deprecations Xcode now supports debugging apps and running tests on iOS devices running iOS 9.0 and above. (59561001)

  1. Worth checking the contents of Contents -> Developer -> Platforms -> iPhoneOS.platform -> DeviceSupport for iOS 9. Make sure you've got simulator device support files in here.

  2. Also if you have previous Xcode betas installed, make sure you set the Command Line Tools again to the latest Xcode beta you want to use (they get deactivated if you install a new version of Xcode).

  3. As mentioned in other answers, remove the $(VALID_ARCHS) build setting from your main and CocoaPods targets .

  4. Check your Architecture Build Settings are set to $(ARCHS_STANDARD) for all targets. It's strange that you are using the arm architecture - usually simulator builds are x86_64, hence you need to address any conflicting architecture build settings (are you using Mac Catalyst or the Developer Transition Kit perhaps?).

  1. Disable these scheme settings (in Edit Scheme in the toolbar), as well as Main Thread Checker. This works as a workaround for many build/runtime bugs in Xcode.

  1. Also, I would check if you are using the new Build System for your build settings for Pods and app targets. Conflicting settings here could be the issue. From Xcode 12 Beta Release Notes:

The legacy build system is deprecated, and will be removed in a future release. (62742902)

For each of these steps, make sure you clear Derived Data and rebuild. It would also be a good idea to restart Xcode between attempts. If none of the 7 suggestions work then I would recommend you raise a bug ticket on Feedback Assistant. Xcode is going through a lot of rapid improvements in the beta phase, so there is probably going to be some unexpected behaviour.

这篇关于无法使用Xcode 12.0 beta 5构建项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆