gpt4 book ai didi

ios - 在 macOS Big Sur 上安装 react native 时出现 "Undefined symbol: protocol descriptor for Swift.ExpressibleByFloatLiteral"问题

转载 作者:行者123 更新时间:2023-12-04 04:25:33 27 4
gpt4 key购买 nike

我试图在我的系统上安装 React Native,发现它无法安装该模板错误所需的 CocoaPods 依赖项。sudo arch -x86_64 gem install ffi修复了这个问题,但最终得到 event-config.h" file not found错误。
我将 pod 文件中已更改的鳍状肢版本更改为 use_flipper!({'Flipper'=>'0.76.0'})然后我遇到了上面提到的错误。对此问题的任何帮助将不胜感激。

node version : 15.10.0
react-native version: 0.63.4
Xcode version: 12.4
错误描述如下:
Showing Recent Messages

Could not find or use auto-linked library 'swiftCoreGraphics'
Could not find or use auto-linked library 'swiftUIKit'
Could not find or use auto-linked library 'swiftDarwin'
Could not find or use auto-linked library 'swiftFoundation'
Could not find or use auto-linked library 'swiftMetal'
Could not find or use auto-linked library 'swiftObjectiveC'
Could not find or use auto-linked library 'swiftCoreFoundation'
Could not find or use auto-linked library 'swiftDispatch'
Could not find or use auto-linked library 'swiftCoreImage'
Could not find or use auto-linked library 'swiftQuartzCore'
Could not find or use auto-linked library 'swiftCore'
Could not find or use auto-linked library 'swiftSwiftOnoneSupport'
Undefined symbol: protocol descriptor for Swift.ExpressibleByFloatLiteral
Undefined symbol: associated type descriptor for Swift.ExpressibleByIntegerLiteral.IntegerLiteralType

Undefined symbol: associated conformance descriptor for Swift.ExpressibleByIntegerLiteral.Swift.ExpressibleByIntegerLiteral.IntegerLiteralType: Swift._ExpressibleByBuiltinIntegerLiteral

Undefined symbol: method descriptor for Swift.ExpressibleByFloatLiteral.init(floatLiteral: A.FloatLiteralType) -> A

Undefined symbol: protocol descriptor for Swift.ExpressibleByIntegerLiteral
Undefined symbol: value witness table for Builtin.Int32
Undefined symbol: __swift_FORCE_LOAD_$_swiftCoreImage
Undefined symbol: associated type descriptor for Swift.ExpressibleByFloatLiteral.FloatLiteralType
Undefined symbol: __swift_FORCE_LOAD_$_swiftQuartzCore
Undefined symbol: __swift_FORCE_LOAD_$_swiftDispatch
Undefined symbol: method descriptor for Swift.ExpressibleByIntegerLiteral.init(integerLiteral: A.IntegerLiteralType) -> A
Undefined symbol: __swift_FORCE_LOAD_$_swiftCoreFoundation
Undefined symbol: protocol witness table for Swift.Int : Swift._ExpressibleByBuiltinIntegerLiteral in Swift
Undefined symbol: __swift_FORCE_LOAD_$_swiftObjectiveC
Undefined symbol: __swift_FORCE_LOAD_$_swiftCoreGraphics
Undefined symbol: _swift_getForeignTypeMetadata
Undefined symbol: __swift_FORCE_LOAD_$_swiftFoundation
Undefined symbol: associated conformance descriptor for Swift.ExpressibleByFloatLiteral.Swift.ExpressibleByFloatLiteral.FloatLiteralType: Swift._ExpressibleByBuiltinFloatLiteral
Undefined symbol: __swift_FORCE_LOAD_$_swiftUIKit
Undefined symbol: __swift_FORCE_LOAD_$_swiftMetal
Undefined symbol: Swift.Float.init(Swift.Double) -> Swift.Float
Undefined symbol: __swift_FORCE_LOAD_$_swiftDarwin
Undefined symbol: protocol witness table for Swift.Float : Swift._ExpressibleByBuiltinFloatLiteral in Swift

最佳答案

如果您使用的是 M1 mac,则需要排除架构 arm64。
Please check this image
还要在 pod 文件的末尾添加此代码

post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings["ONLY_ACTIVE_ARCH"] = "NO"
end
end
end
执行 pod install,清理构建文件夹并重新启动构建,它将解决问题。
更新:对于 xCode 13,使用以下配置:
如果您面对 Command PhaseScriptExecution failed with a nonzero exit code in react native xcode 13 Command PhaseScriptExecution failed with a nonzero exit code in react native xcode 13

关于ios - 在 macOS Big Sur 上安装 react native 时出现 "Undefined symbol: protocol descriptor for Swift.ExpressibleByFloatLiteral"问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/66369650/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com