gpt4 book ai didi

ios - 架构 x86_64 : referenced from: _YGConfigNew in libyoga. a(Yoga.o) 的 undefined symbol 问题

转载 作者:行者123 更新时间:2023-11-28 23:35:50 34 4
gpt4 key购买 nike

我使用 xcode 10 并在尝试构建时收到以下错误:

Undefined symbols for architecture x86_64: "YGConfig::YGConfig(int ()(YGConfig, YGNode*, YGLogLevel, char const*, __va_list_tag*))", referenced from: _YGConfigNew in libyoga.a(Yoga.o) 

我的 podfile 看起来像:

target 'CrisisApp' do
# Uncomment the next line if you're using Swift or would like to use
dynamic frameworks
# use_frameworks!

# Pods for CrisisApp

pod 'React', :path => '../node_modules/react-native', :subspecs => [
'Core',
'CxxBridge'
]

pod 'Interactable', :path => '../node_modules/react-native-interactable'

pod 'Folly', :podspec => '../node_modules/react-native/third-party-
podspecs/Folly.podspec'
pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga'

pod 'ReactNativePermissions', :path => '../node_modules/react-native-permissions'

pod 'react-native-image-picker', :path => '../node_modules/react-native-image-picker'

pod 'rn-fetch-blob', :path => '../node_modules/rn-fetch-blob'

pod 'react-native-pdf', :path => '../node_modules/react-native-pdf'

pod 'lottie-ios', :path => '../node_modules/lottie-ios'

pod 'lottie-react-native', :path => '../node_modules/lottie-react-native'

pod 'RNDeviceInfo', :path => '../node_modules/react-native-device-info'


target 'CrisisApp-tvOSTests' do
inherit! :search_paths
# Pods for testing
pod 'ReactNativePermissions', :path => '../node_modules/react-native-permissions'

pod 'react-native-image-picker', :path => '../node_modules/react-native-image-picker'

pod 'rn-fetch-blob', :path => '../node_modules/rn-fetch-blob'

pod 'react-native-pdf', :path => '../node_modules/react-native-pdf'

pod 'lottie-ios', :path => '../node_modules/lottie-ios'

pod 'lottie-react-native', :path => '../node_modules/lottie-react-native'

pod 'RNDeviceInfo', :path => '../node_modules/react-native-device-info'

end

target 'CrisisAppTests' do
inherit! :search_paths
# Pods for testing
end

end

target 'CrisisApp-tvOS' do
# Uncomment the next line if you're using Swift or would like to use dynamic frameworks
# use_frameworks!

# Pods for CrisisApp-tvOS

end

我在 SO 上看到了另外两个类似的问题,但到目前为止没有回复,所以请帮忙

其他问题的链接:Undefined symbols for architecture x86_64 : referenced from: _YGConfigNew in libyoga.a(Yoga.o)

React Native iOS build failing for the following error: symbol(s) not found for architecture arm64

最佳答案

我认为有两种解决方案:

1) 您可以删除所有这些 pod 并在项目目标中添加依赖项链接框架和库,如下所示:

enter image description here

将它们添加到那里后,您可以从 pod 文件中删除这些行:

pod 'ReactNativePermissions', :path => '../node_modules/react-native-permissions'

pod 'react-native-image-picker', :path => '../node_modules/react-native-image-picker'

pod 'rn-fetch-blob', :path => '../node_modules/rn-fetch-blob'

pod 'react-native-pdf', :path => '../node_modules/react-native-pdf'

pod 'lottie-ios', :path => '../node_modules/lottie-ios'

pod 'lottie-react-native', :path => '../node_modules/lottie-react-native'

pod 'RNDeviceInfo', :path => '../node_modules/react-native-device-info'

如果您遇到更多与其他 RN 或 React 库相关的崩溃,请确保它们在链接的框架和库中。

2) 如果您的 RN 版本>0.60,您可以尝试使用自动链接,从 Xcode 链接的框架和库中删除这些依赖项(另请检查大型 ios 项目文件),仅将 deps 保留在 pod 文件中并运行 pod install .

您可以对每个库逐步尝试这种自动链接,它可能不适用于某些旧库。还要检查您的库版本是否支持自动链接。

关于ios - 架构 x86_64 : referenced from: _YGConfigNew in libyoga. a(Yoga.o) 的 undefined symbol 问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54976645/

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