我最近将本机版本升级为
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文件(其他本机项目具有有效的.app文件)
因此,似乎该构建正在创建一个无效的.app文件,由于文件/文件夹不可用,该文件随后(可以理解)无法链接。
是否有机会获得详细的见解,是什么原因导致此无效的.app文件以及如何修复该文件?
任何提示都很感激!
答案 0 :(得分:2)
Xcode Archive build failed with react native project
关于JavaScriptCore.framework
的第一个答案可以挽救我的生命,希望如此:
答案 1 :(得分:2)
您应将 Private Sub Scanner1_DataReceived(ByVal sender As System.Object, ByVal e As System.IO.Ports.SerialDataReceivedEventArgs) Handles Scanner1.DataReceived
dataIn = Scanner1.ReadExisting
SetText(dataIn)
End Sub
Delegate Sub SetTextCallback(ByVal text As String)
Private Sub SetText(ByVal text As String)
If Me.txtSearch.InvokeRequired Or Me.txtSearch1.InvokeRequired Then
Dim d As SetTextCallback = New SetTextCallback(AddressOf SetText)
Me.Invoke(d, New Object() {text})
Else
Me.txtSearch.Text = text.ToString
Me.txtSearch1.Text = text.ToString
End If
End Sub
添加到JavaScriptCore.Framework
-> Build Phases
。