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

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

[!] 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参数,解决问题。

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。