我的问题
1、通过Pub依赖了 shared_preferences: ^0.5.3+4 三方库。依赖别三方库也有可能;
2、执行flutter pub get
后,ios目录下多了Podfile
文件夹,同时有些文件内容也会发生修改;
3、项目运行出错,提示信息是pod install
中出的错,并显示Unknown installation options: disable_input_output_paths.
以及一些关于CocoaPods版本的日志。同样,我们如果在终端,进入ios目录,执行pod install命令的话,在终端也会直接提示Unknown installation options: disable_input_output_paths.
这个错误。
解决方法
打开终端,输入
sudo gem install cocoapods
来升级CocoaPods;
如果遇到
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /usr/bin directory.
这个错误的话就改用sudo gem install cocoapods -n /usr/local/bin
命令即可。
网友评论