【问题标题】:yoga/Yoga.h header file not found after react-native(0.40.0) integration in the existing iOS app在现有 iOS 应用程序中集成 react-native(0.40.0) 后未找到 yoga/Yoga.h 头文件
【发布时间】:2017-01-06 12:20:34
【问题描述】:

在我的 Swift iOS 应用程序中集成 react-native 后,我无法构建。 yoga/Yoga.h file cannot be found. 我浏览了文档,查看了 react-native github 页面,查看了关于类似问题的 SO 问题。这些解决方案似乎都不起作用。

对此的任何帮助将不胜感激。这灾难性地毁了我的一天!

这是我的 pod 文件

platform :ios, '9.0'

 use_frameworks!


target 'MyCustomApp' do
    pod 'Alamofire', '~> 4.0'


    pod 'React', :path => './node_modules/react-native', :subspecs => [
    'Core',
    'RCTText',
    'RCTNetwork',
    'RCTWebSocket',# needed for debugging
    'RCTText',
    'RCTImage'
    # Add any other subspecs you want to use in your project
    ]

end

【问题讨论】:

  • 你能添加更多关于你的问题的细节吗?像任何明确的错误消息或您正在尝试做什么?您的 podfile 内容可能是一个好的开始。
  • @aimak 编辑了我的问题
  • 我基本上是想先成功构建。我要做的是在 React-Native 中创建一个页面,完全用于原生 iOS 应用程序。
  • 好的,但 Yoga.h 是什么?
  • 我正在与同样的问题作斗争。构建在这条线上失败github.com/facebook/react-native/blob/master/React/Base/… 说明yoga/Yoga.h file cannot be found

标签: ios swift react-native


【解决方案1】:

YogaCSSLayout 重命名为:https://github.com/facebook/react-native/commit/7f8c2985a8e447fd18f8b9331d4f35abeadaeb0e

这似乎是几个react-nativeCSSLayout 版本中一直存在的问题,现在它恰好有一个不同的名称。这是使用post_install 的解决方法:https://github.com/facebook/react-native/issues/11272

【讨论】:

猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2017-05-02
  • 2018-08-29
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多