React Native 0.64.2归档失败:arm64架构缺失_swift_stdlib_isStackAllocationSafe符号
解决React Native 0.64.2在Intel Mac归档时的arm64链接错误
可行解决方案:
1. 补全Swift标准库依赖
- 打开Xcode项目,选中对应target进入Build Phases标签页
- 在Link Binary With Libraries区域点击
+,搜索libswiftCore.tbd并添加到依赖列表 - 确保Build Settings里的
Always Embed Swift Standard Libraries参数设置为YES
2. 调整编译架构配置
- 进入target的Build Settings,找到
Architectures选项 - 将
Architectures设置为Standard Architectures (arm64, x86_64) - 在Release模式下,把
Excluded Architectures设置为空(避免排除arm64架构)
3. 清理缓存后重新构建
- 执行以下命令清理项目缓存:
rm -rf node_modules && npm install cd ios && pod deintegrate && pod install xcodebuild clean - 重启Xcode后重新尝试归档操作
4. 排查第三方库兼容性
- 错误日志指向
BLEManager.o,说明该蓝牙第三方库存在Swift版本或架构兼容问题 - 确认该库版本是否适配React Native 0.64.2与arm64架构,尝试升级或替换该库
内容的提问来源于stack exchange,提问作者lreddy
相关产品推荐
相关产品推荐

