- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我使用 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 并在项目目标中添加依赖项链接框架和库,如下所示:
将它们添加到那里后,您可以从 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/
当我在 iOS 模拟器 中使用 XCode 或 react-native run-ios 启动我的应用程序时,它运行良好。 但如果我在真实设备中做同样的事情,它就不起作用了。我遇到了这个错误: Und
我使用 xcode 10 并在尝试构建时收到以下错误: Undefined symbols for architecture x86_64: "YGConfig::YGConfig(int ()(YG
我是一名优秀的程序员,十分优秀!