0

谁能解释为什么 pod install 会删除 React。它还显示了产品中缺少的 React--> 编辑方案。

我需要任何好的解决方案

RCTBrigeModule.h 文件未找到错误?

我不知道如何解决这个问题。

在取消链接包并且不运行 pod install 之前

# Uncomment the next line to define a global platform for your project
platform :ios, '9.0'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
pod 'Fabric'
pod 'Crashlytics'

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

  # Pods for App

  target 'App-tvOSTests' do
    inherit! :search_paths
    # Pods for testing
    pod 'rn-fetch-blob', :path => '../node_modules/rn-fetch-blob'

    pod 'BVLinearGradient', :path => '../node_modules/react-native-linear-gradient'

    pod 'RNVectorIcons', :path => '../node_modules/react-native-vector-icons'
    pod 'RNImageCropPicker', :path => '../node_modules/react-native-image-crop-picker'

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

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

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

    pod 'RNViewShot', :path => '../node_modules/react-native-view-shot'

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

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

    pod 'RNGestureHandler', :path => '../node_modules/react-native-gesture-handler'

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

  end

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

end

链接并运行 pod install 后

# Uncomment the next line to define a global platform for your project
platform :ios, '9.0'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
pod 'Fabric'
pod 'Crashlytics'

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

  # Pods for App

  target 'App-tvOSTests' do
    inherit! :search_paths
    # Pods for testing


  end

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

end
4

1 回答 1

0

如果您尝试升级到 v0.60+,则必须使用此工具手动执行此操作。( https://react-native-community.github.io/upgrade-helper/ )。有许多重大变化,包括 pod 支持和 androidX 支持。

将所有库更新到最新版本,在从 Xcode 升级 RN 之前删除所有手动链接的库,以避免 Xcode 崩溃。

本文可能会有所帮助https://reactnative.thenativebits.com/courses/upgrading-react-native/upgrade-to-react-native-0.60/

于 2019-11-28T13:24:16.057 回答