You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Unity 2020.3.48f1用Burst Compiler编译iOS时无法定位iphoneos SDK求助

Unity iOS构建Burst编译失败:无法定位iPhoneOS SDK解决办法

问题核心

使用Unity 2020.3.48f1搭配Burst Compiler 1.6.6进行iOS构建时,Burst编译器因无法找到iPhoneOS SDK路径报错,关键错误日志:

BuildFailedException: Burst compiler (1.6.6) failed running

stdout:
Overriding backend due to platform constraints : 'burst-llvm-10'
Failed to determine iphoneos sdk installation path - /Applications/XCode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk does not exist, and "xcrun --sdk iphoneos --show-sdk-path" failed with  xcrun: error: SDK "iphoneos" cannot be located
xcrun: error: SDK "iphoneos" cannot be located
xcrun: error: unable to lookup item 'Path' in SDK 'iphoneos'

解决步骤

1. 检查Xcode安装与SDK完整性

  • 确认Xcode安装在默认路径/Applications/Xcode.app(Mac系统默认Xcode文件夹名是小写首字母的Xcode.app,路径大小写错误会导致识别失败)
  • 打开Xcode,进入Xcode > 设置 > 平台,查看iOS平台是否已安装对应SDK。若未安装,点击下载按钮安装最新iOS SDK
  • 进入Xcode > 设置 > 位置,确认命令行工具已选择当前安装的Xcode版本

2. 修复命令行工具路径

打开终端,执行以下命令:

xcode-select --switch /Applications/Xcode.app/Contents/Developer
xcrun --sdk iphoneos --show-sdk-path

若命令返回类似/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.0.sdk的有效路径,说明路径问题已修复

3. 调整Unity设置

  • 打开Unity,进入编辑 > 偏好设置 > 外部工具,确认iOS模块的Xcode路径设置为/Applications/Xcode.app
  • 进入编辑 > 项目设置 > Burst编译器,取消勾选启用增量编译,重新执行构建
  • 若问题仍存在,在Unity Package Manager中搜索Burst Compiler,更新至与Unity 2020.3.48f1兼容的最新版本

4. 重启验证

完成上述操作后,重启Xcode和Unity,清除构建缓存后重新尝试iOS构建

内容的提问来源于stack exchange,提问作者김은규

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.07 04:26:35