Duplicate Module Name: react-native

前端 未结 5 1377
梦如初夏
梦如初夏 2021-02-01 14:38

I ran Pod Update in my XCode Project and now my project isn\'t compiling due to duplicate modules being downloaded. Anyone know any solutions?

Looki         


        
5条回答
  •  一生所求
    2021-02-01 14:50

    remove the "React" folder inside of your "Pod" folder

    add this inside of your pod file at the bottom after the last end

    post_install do |installer|
      installer.pods_project.targets.each do |target|
    
    # The following is needed to ensure the "archive" step works in XCode.
    # It removes React & Yoga from the Pods project, as it is already included in the main project.
    # Without this, you'd see errors when you archive like:
    # "Multiple commands produce ... libReact.a"
    # "Multiple commands produce ... libyoga.a"
    
        targets_to_ignore = %w(React yoga)
    
        if targets_to_ignore.include? target.name
          target.remove_from_project
        end
    
      end
    end
    

    remove your Pods folder and then go pod install

提交回复
热议问题