【问题标题】:React Native Navigation React/RCTRootView.h file not found未找到 React Native Navigation React/RCTRootView.h 文件
【发布时间】:2018-09-10 06:17:04
【问题描述】:

我正在尝试使用 React Native Navigation 参考这个指令 https://wix.github.io/react-native-navigation/#/installation-ios

当我链接 libReactNativeNavigation.a Xcode 显示错误时,我停留在第 3 步,我不知道如何解决此问题!

这是我的 package.json

"dependencies": {
    "react": "~16.2.0",
    "react-native": "~0.51.0",
    "react-native-navigation" : "1.1.428"

  }

我的 Pod 文件

source 'https://github.com/CocoaPods/Specs.git'

platform :ios, '10.0'

target 'MyApp' do
  # Comment the next line if you're not using Swift and don't want to use dynamic frameworks
  use_frameworks!

  # Pods for React
  pod 'React', :path => '../js/node_modules/react-native', :subspecs => [
  'Core',
  'CxxBridge', # Include this for RN >= 0.47
  'DevSupport', # Include this to enable In-App Devmenu if RN >= 0.43
  'RCTImage',
  'RCTNetwork',
  'RCTText',
  'RCTWebSocket',
]
   # Explicitly include Yoga if you are using RN >= 0.42.0
  pod "yoga", :path => "../js/node_modules/react-native/ReactCommon/yoga"

  # Third party deps podspec link
  pod 'DoubleConversion', :podspec => '../js/node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
  pod 'GLog', :podspec => '../js/node_modules/react-native/third-party-podspecs/GLog.podspec'
  pod 'Folly', :podspec => '../js/node_modules/react-native/third-party-podspecs/Folly.podspec'

【问题讨论】:

    标签: react-native react-native-ios react-native-navigation


    【解决方案1】:

    这是因为 React-Native-Navigation 是你项目的子项目,它依赖于你通过 cocoapods 添加到项目中的 React。

    尝试将${BUILT_PRODUCTS_DIR} recursive 添加到 Build Settings -> FRAMEWORK_SEARCH_PATHS in ReactNativeNavigation.xcodeproj

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2022-01-16
      • 1970-01-01
      • 1970-01-01
      • 2017-10-24
      • 1970-01-01
      • 2020-12-01
      • 2022-10-25
      相关资源
      最近更新 更多