剛安裝完Flutter執(zhí)行pod install報(bào)錯(cuò)非洲,信息如下
[!] Invalid `Podfile` file: undefined method `exists?' for File:Class.
# from /Users/zhujikai/Desktop/工作代碼/flutter_module/.ios/Podfile:31
# -------------------------------------------
# use_frameworks!
> flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
#
# -------------------------------------------
解決方法:
打開(kāi) /flutter/packages/flutter_tools/bin/podhelper.rb 文件
找到
return [] unless File.exists? file_path
替換成
return [] unless File.exist? file_path