`activate_dependency 中的块中的救援':无法在 117 个 gem 中找到 'rexml' (>= 0) (Gem::MissingSpecError)

Cra*_*Sau 12 ios react-native

在我的 ReactNative iOS 应用程序中运行时遇到问题pod install,因为尝试运行模拟器时构建失败。这是这样做时发生的两个错误。在 2021 M1 Macbook Pro 上本地运行此程序,这是我第一次尝试构建 ReactNative 应用程序并设置开发环境,因此感谢任何为我指明正确方向的帮助。如果您需要任何其他信息,请告诉我,我会尽力尽快提供。

`rescue in block in activate_dependencies': Could not find 'rexml' (>= 0) among 117 total gem(s) (Gem::MissingSpecError)
Checked in 'GEM_PATH=/Users/craigsau/.rvm/gems/ruby-2.7.5:/Users/craigsau/.rvm/rubies/ruby-2.7.5/lib/ruby/gems/2.7.0:/opt/homebrew/Cellar/cocoapods/1.11.3/libexec' at: /opt/homebrew/Cellar/cocoapods/1.11.3/libexec/specifications/CFPropertyList-3.0.5.gemspec, execute `gem env` for more information
    from /opt/homebrew/Cellar/ruby/3.1.2_1/lib/ruby/3.1.0/rubygems/specification.rb:1398:in `block in activate_dependencies'
    from /opt/homebrew/Cellar/ruby/3.1.2_1/lib/ruby/3.1.0/rubygems/specification.rb:1387:in `each'
    from /opt/homebrew/Cellar/ruby/3.1.2_1/lib/ruby/3.1.0/rubygems/specification.rb:1387:in `activate_dependencies'
    from /opt/homebrew/Cellar/ruby/3.1.2_1/lib/ruby/3.1.0/rubygems/specification.rb:1369:in `activate'
    from /opt/homebrew/Cellar/ruby/3.1.2_1/lib/ruby/3.1.0/rubygems/specification.rb:1405:in `block in activate_dependencies'
    from /opt/homebrew/Cellar/ruby/3.1.2_1/lib/ruby/3.1.0/rubygems/specification.rb:1387:in `each'
    from /opt/homebrew/Cellar/ruby/3.1.2_1/lib/ruby/3.1.0/rubygems/specification.rb:1387:in `activate_dependencies'
    from /opt/homebrew/Cellar/ruby/3.1.2_1/lib/ruby/3.1.0/rubygems/specification.rb:1369:in `activate'
    from /opt/homebrew/Cellar/ruby/3.1.2_1/lib/ruby/3.1.0/rubygems/specification.rb:1405:in `block in activate_dependencies'
    from /opt/homebrew/Cellar/ruby/3.1.2_1/lib/ruby/3.1.0/rubygems/specification.rb:1387:in `each'
    from /opt/homebrew/Cellar/ruby/3.1.2_1/lib/ruby/3.1.0/rubygems/specification.rb:1387:in `activate_dependencies'
    from /opt/homebrew/Cellar/ruby/3.1.2_1/lib/ruby/3.1.0/rubygems/specification.rb:1369:in `activate'
    from /opt/homebrew/Cellar/ruby/3.1.2_1/lib/ruby/3.1.0/rubygems.rb:286:in `block in activate_bin_path'
    from /opt/homebrew/Cellar/ruby/3.1.2_1/lib/ruby/3.1.0/rubygems.rb:285:in `synchronize'
    from /opt/homebrew/Cellar/ruby/3.1.2_1/lib/ruby/3.1.0/rubygems.rb:285:in `activate_bin_path'
    from /opt/homebrew/Cellar/cocoapods/1.11.3/libexec/bin/pod:25:in `<main>'
Run Code Online (Sandbox Code Playgroud)
Could not find 'rexml' (>= 0) among 117 total gem(s) (Gem::MissingSpecError)
Checked in 'GEM_PATH=/Users/craigsau/.rvm/gems/ruby-2.7.5:/Users/craigsau/.rvm/rubies/ruby-2.7.5/lib/ruby/gems/2.7.0:/opt/homebrew/Cellar/cocoapods/1.11.3/libexec' , execute `gem env` for more information
    from /opt/homebrew/Cellar/ruby/3.1.2_1/lib/ruby/3.1.0/rubygems/specification.rb:1399:in `block in activate_dependencies'
    from /opt/homebrew/Cellar/ruby/3.1.2_1/lib/ruby/3.1.0/rubygems/specification.rb:1387:in `each'
    from /opt/homebrew/Cellar/ruby/3.1.2_1/lib/ruby/3.1.0/rubygems/specification.rb:1387:in `activate_dependencies'
    from /opt/homebrew/Cellar/ruby/3.1.2_1/lib/ruby/3.1.0/rubygems/specification.rb:1369:in `activate'
    from /opt/homebrew/Cellar/ruby/3.1.2_1/lib/ruby/3.1.0/rubygems/specification.rb:1405:in `block in activate_dependencies'
    from /opt/homebrew/Cellar/ruby/3.1.2_1/lib/ruby/3.1.0/rubygems/specification.rb:1387:in `each'
    from /opt/homebrew/Cellar/ruby/3.1.2_1/lib/ruby/3.1.0/rubygems/specification.rb:1387:in `activate_dependencies'
    from /opt/homebrew/Cellar/ruby/3.1.2_1/lib/ruby/3.1.0/rubygems/specification.rb:1369:in `activate'
    from /opt/homebrew/Cellar/ruby/3.1.2_1/lib/ruby/3.1.0/rubygems/specification.rb:1405:in `block in activate_dependencies'
    from /opt/homebrew/Cellar/ruby/3.1.2_1/lib/ruby/3.1.0/rubygems/specification.rb:1387:in `each'
    from /opt/homebrew/Cellar/ruby/3.1.2_1/lib/ruby/3.1.0/rubygems/specification.rb:1387:in `activate_dependencies'
    from /opt/homebrew/Cellar/ruby/3.1.2_1/lib/ruby/3.1.0/rubygems/specification.rb:1369:in `activate'
    from /opt/homebrew/Cellar/ruby/3.1.2_1/lib/ruby/3.1.0/rubygems.rb:286:in `block in activate_bin_path'
    from /opt/homebrew/Cellar/ruby/3.1.2_1/lib/ruby/3.1.0/rubygems.rb:285:in `synchronize'
    from /opt/homebrew/Cellar/ruby/3.1.2_1/lib/ruby/3.1.0/rubygems.rb:285:in `activate_bin_path'
    from /opt/homebrew/Cellar/cocoapods/1.11.3/libexec/bin/pod:25:in `<main>'
Run Code Online (Sandbox Code Playgroud)

尝试运行命令 ,但在尝试通过模拟器运行 ReactNative 模板时gem install bundler gem update --system 尝试运行命令以修复构建时仍然给出相同的错误。pod install

eth*_*eff 23

运行以下命令

gem cleanup
brew uninstall cocoapods
sudo gem uninstall cocoapods
sudo gem install cocoapods
cd ios
pod install --repo-update
Run Code Online (Sandbox Code Playgroud)