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

930 阅读1分钟

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@3.1
echo 'export PATH="/opt/homebrew/opt/ruby@3.1/bin:$PATH"' >> ~/.zshrc
gem install cocoapods
echo 'export PATH="/opt/homebrew/lib/ruby/gems/3.1.0/bin:$PATH"' >> ~/.zshrc

原文地址: blog.csdn.net/qq_28641023…