CocoaPods could not find compatible versions for pod “ReactCommon/jscallinvoker”:

前端 未结 11 2679
清酒与你
清酒与你 2020-12-13 03:30

I just updated to RN v0.62 and running app on iOS gives me following error

!] CocoaPods could not find compatible versions for pod \"ReactCommon/jscallinvoke         


        
11条回答
  •  借酒劲吻你
    2020-12-13 03:44

    On Upgrade to React Native 0.63.0

    This issue happens to my project after upgrading React Native to version 0.63.0 so for the solution I just remove the Podfile.lock and delete whole the Podfile and add the new content from a fresh install React Native project on the latest version and it means its content should be:

    require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
    require_relative '../node_modules/react-native/scripts/react_native_pods'
    
    platform :ios, '10.0'
    
    target '[YourProjectName]' do
      config = use_native_modules!
      use_react_native!(:path => config["reactNativePath"])
    
      target '[YourProjectName]Tests' do
        inherit! :complete
        # Pods for testing
      end
    
      # Enables Flipper.
      #
      # Note that if you have use_frameworks! enabled, Flipper will not work and
      # you should disable these next few lines.
      use_flipper!
      post_install do |installer|
        flipper_post_install(installer)
      end
    end
    
    target '[YourProjectName]-tvOS' do
      # Pods for [YourProjectName]-tvOS
    
      target '[YourProjectName]-tvOSTests' do
        inherit! :search_paths
        # Pods for testing
      end
    end
    

    Note: it is obvious you should replace your project name with [YourProjectName].

    After it, run npx pod-install command on the root of your project and everything will back on track.

提交回复
热议问题