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

前端 未结 11 2665
清酒与你
清酒与你 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:55

    I think jscallinvoker version is deprecated try to replacing

    jscallinvoker 
    

    to

    callinvoker
    
    0 讨论(0)
  • 2020-12-13 03:56

    In RN 0.63.0 you can remove all RN pods from you podfile and just include the following lines inside the target.

    config = use_native_modules!
    use_react_native!(:path => config["reactNativePath"])
    

    Also this line needs to be added after the platform line at the beginning of the podfile:

    require_relative '../node_modules/react-native/scripts/react_native_pods'
    

    After this, delete the Pods directory, Podfile.lock and the workspace file. Then just pod install.

    0 讨论(0)
  • 2020-12-13 03:56

    Faced this issue while upgrading Expo bare workflow 0.38 (RN 0.62) to 0.39 (has RN 0.63). Edited answer of @Pritish did work, But it says this error

    [!] Unable to find a target named `RNTodo-tvOS` in project `RNTodo.xcodeproj`, did find `RNTodo`.

    And

    [!] Unable to find a target named `RNTodoTests` in project `RNTodo.xcodeproj`, did find `RNTodo`.

    Got workaround by changing Podfile like below

    require_relative '../node_modules/react-native/scripts/react_native_pods'
    require_relative '../node_modules/react-native-unimodules/cocoapods.rb'
    require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
    
    platform :ios, '10.0'
    
    target 'daytodiary' do
      use_unimodules!
      config = use_native_modules!
      use_react_native!(:path => config["reactNativePath"])
    
      # 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
    
    

    What changed?

    ADD unimodules at top

    require_relative '../node_modules/react-native-unimodules/cocoapods.rb'
    

    ADD use_unimodules! before config = use_native_modules!.

    REMOVE

    target '[YourProjectName]Tests' do
        inherit! :complete
        # Pods for testing
      end
    

    REMOVE

    target 'RNTodo-tvOS' do
      # Pods for RNTodo-tvOS
    
      target 'RNTodo-tvOSTests' do
        inherit! :search_paths
        # Pods for testing
      end
    end
    

    For Android (If you are getting errors after upgrading)

    In android/build.gradle Change

    ext {
            buildToolsVersion = "28.0.3"
            minSdkVersion = 21
            compileSdkVersion = 28
            targetSdkVersion = 28
        }
    

    To

    ext {
            buildToolsVersion = "29.0.2"
            minSdkVersion = 21
            compileSdkVersion = 29
            targetSdkVersion = 29
        }
    
    0 讨论(0)
  • 2020-12-13 03:57

    I solved this issue (version 0.63) by changing the line in the Podfile from

    pod 'ReactCommon/callinvoker', :path => "../node_modules/react-native/ReactCommon"
    

    to

    pod 'React-callinvoker', :path => "../node_modules/react-native/ReactCommon/callinvoker"
    
    0 讨论(0)
  • 2020-12-13 03:59

    In case you already had callinvoker but you still have an error. This manipulation helped me :

     react-native start --reset-cache
     rm -rf node_modules/
     rm -rf package-lock.json 
     cd ios
     pod deintegrate
     cd ..
     rm -rf ios/Podfile.lock 
     npm install
     npm audit fix
     react-native link
     cd ios
     pod install
     cd ..
     react-native run-ios
    
    0 讨论(0)
提交回复
热议问题