首页 > 解决方案 > 澄清:升级到最新版本后,任何人都可以使用 react-native latest (0.61.5) 成功构建应用程序

问题描述

我有一个澄清。我正在尝试升级我的 react-native 版本。但是,它仍然显示运行时错误。任何人都可以毫无问题地构建 react-native (0.61.5)。

我们中的许多人都面临找不到 React/RCTBridgeModule.h' 文件。还没有解决办法。所以我搬到了0.60.0。任何人都有任何好的解决方案。

In file included from /Applications/App/ios/helloworld/AppDelegate.m:11:
../node_modules/bugsnag-react-native/cocoa/BugsnagReactNative.h:3:9: fatal error: 'React/RCTBridgeModule.h' file not found

注意:从 ios 文件夹安装 pod,清理 pod 和 Xcode,我也尝试了许多解决方案。没有什么对我有用。

我之前的 Podfile

# 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 'BugsnagReactNative', :path => '../node_modules/bugsnag-react-native'
    #pod 'rn-fetch-blob', :path => '../node_modules/rn-fetch-blob'

    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'

  end

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

end

我现在的 Podfile

# 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

标签: react-nativereact-native-androidreact-native-ios

解决方案


推荐阅读