xcode - react-native - 升级后链接失败:ld:未找到架构 x86_64 的符号
问题描述
我最近升级了 react-native 版本
react-native upgrade
并遵循所有步骤,到目前为止没有任何错误。现在,当我想构建 ios 版本时,我收到以下错误:
❌ ld: symbol(s) not found for architecture x86_64
❌ clang: error: linker command failed with exit code 1 (use -v to see invocation)
** 构建失败 **
以下构建命令失败:
Ld build/Build/Products/Debug-iphonesimulator/CustomName.app/CustomName normal x86_64
(1 次失败)
The following commands produced analyzer issues:
Analyze Base/RCTModuleMethod.mm normal x86_64
Analyze RCTNetInfo.m normal x86_64
Analyze RCTImageCache.m normal x86_64
(3 commands with analyzer issues)
我的项目环境
React Native Environment Info:
System:
OS: macOS 10.14.3
CPU: (8) x64 Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz
Memory: 140.02 MB / 16.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 11.7.0 - /usr/local/bin/node
Yarn: 1.13.0 - /usr/local/bin/yarn
npm: 6.5.0 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 12.1, macOS 10.14, tvOS 12.1, watchOS 5.1
IDEs:
Xcode: 10.1/10B61 - /usr/bin/xcodebuild
npmPackages:
react: 16.6.3 => 16.6.3
react-native: 0.58.5 => 0.58.5
npmGlobalPackages:
create-react-native-app: 2.0.2
react-native-cli: 2.0.1
react-native-git-upgrade: 0.2.7
react-native-rename: 2.4.0
所以我检查到文件夹
build/Build/Products/Debug-iphonesimulator/
并且可以找到一个被系统禁用的 .app 文件(其他 react-native 项目有一个有效的 .app 文件)
所以看起来构建正在创建一个无效的 .app 文件,然后(可以理解)链接失败,因为文件/文件夹不可用。
是否有机会详细了解导致此无效 .app 文件的原因以及如何修复它?
任何提示表示赞赏!
解决方案
关于拯救我的生命的第一个答案JavaScriptCore.framework
,希望有所帮助:)
推荐阅读
- ios - 如何在 Swift 包管理器中添加二进制框架作为依赖项?
- sql - ORA-01722 选择查询上的无效数字错误 - Oracle
- javascript - 显示上一个在 Javascript 中操作内容后的内容
- javascript - 尝试导入错误,无法编译反应应用程序
- python - TensorFlow 加入两个模型
- html - Web应用程序Safari全屏底部导航固定不工作
- android - 在片段或活动中运行 AsyncTask(从 API 检索数据)是否最佳?
- html - ReactJS Material UI Typescript - withStyles 警告
- amazon-web-services - 带有 FSx 的 AWS Windows Server 连接到 RDP NLA 的 DC 问题
- java - java HashMap 如何在内部工作?