Pod install [!] Invalid `Podfile` file: undefined method `exists?‘ for File:Class.

ruby3.2删除了对 exists 的支持导致以下问题。
不升级Flutter SDK 前提下:降低版本解决。

[!] Invalid `Podfile` file: undefined method `exists?' for File:Class.


 #  from /Users/tt/flutterApp/ios/Podfile:34
 #  -------------------------------------------
 #  
 >    flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
 #  end
 #  -------------------------------------------
brew install ruby.1
echo 'export PATH="/opt/homebrew/opt/[email protected]/bin:$PATH"' >> ~/.zshrc
gem install cocoapods
echo 'export PATH="/opt/homebrew/lib/ruby/gems/3.1.0/bin:$PATH"' >> ~/.zshrc

/opt/homebrew 改成你自己的路径

以上配置完成
重要的一点:需要关机重启 !!!

猜你喜欢

转载自blog.csdn.net/qq_28641023/article/details/130185289