Flutter CocoaPods not installed 和修改清华源

mac M2使用 flutter 文件 path_provider 的出现

Launching lib/main.dart on macOS in debug mode...
Warning: CocoaPods not installed. Skipping pod install.
  CocoaPods is used to retrieve the iOS and macOS platform side's plugin code that responds to your plugin usage on the Dart side.
  Without CocoaPods, plugins will not work on iOS or macOS.
  For more info, see https://flutter.dev/platform-plugins
To install see https://guides.cocoapods.org/using/getting-started.html#installation for instructions.

Application finished.

安装 CocoaPods

arch -arm64 brew install cocoapods

执行安装

# 进入目录
cd $project/macos

#  在 Podfile 文件开头加入
source 'https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git'

# 执行安装
cd Runner
pod repo remove trunk
pod install

效果如下

posted @ 2023-10-30 16:50  vx_guanchaoguo0  阅读(396)  评论(0编辑  收藏  举报