flutter Warning: CocoaPods is installed but broken. Skipping pod install. You appear to have CocoaPods ins

flutter Warning: CocoaPods is installed but broken. Skipping pod install. You appear to have CocoaPods ins
确保你已经安装了 CocoaPods 并可以正常使用:

1.flutter clean 
2.flutter pub get
3.cd ios
4.pod install
5.退出vscode,并重新打开
6.再次运行项目

运行后如果提示以下错误:

[ERROR:flutter/shell/platform/darwin/graphics/FlutterDarwinContextMetalImpeller.mm(42)] Using the Impeller rendering backend.
[ERROR:flutter/shell/common/shell.cc(117)] Dart Error: Can't load Kernel binary: Invalid kernel binary format version.
[ERROR:flutter/runtime/dart_isolate.cc(144)] Could not prepare isolate.
[ERROR:flutter/runtime/runtime_controller.cc(462)] Could not create root isolate.
[ERROR:flutter/shell/common/shell.cc(669)] Could not launch engine with configuration.
Application finished.
1.删除 flutter sdk目录下 bin/目录下的cache文件夹
2.退出vscode,并重新打开
3.再次运行项目,会自动下载缓存文件,下载完成后就可以成功运行了。
posted @ 2024-06-21 14:19  hczhhm  阅读(6)  评论(0编辑  收藏  举报