mac升级以后flutter doctor检查失败解决方案

之前mac升级,今天跑flutter项目,跑不起来。通过flutter doctor 检查报如下错误

mac升级以后flutter doctor检查失败解决方案_第1张图片
[!] Xcode - develop for iOS and macOS (Xcode 11.7) ✗ CocoaPods installed but not working. You appear to have CocoaPods installed but it is not working. This can happen if the version of Ruby that CocoaPods was installed with is different from the one being used to invoke it. This can usually be fixed by re-installing CocoaPods. For more info, see https://github.com/flutter/flutter/issues/14293. To re-install CocoaPods, run: sudo gem install cocoapods

按照提示sudo gem install cocoapods,及时安装成功也还是报错,google以后感觉应该是版本问题,直接sudo gem install cocoapods --pre,加pre参数,解决问题。

你可能感兴趣的:(mac升级以后flutter doctor检查失败解决方案)