Flutter 桌面 Podfile 丢失(flutter run -d macOS)

Mid*_*laj 1 macos flutter podfile flutter-dependencies flutter-desktop

flutter run -d macOS

Downloading darwin-x64 tools...                                   107.0s
Downloading darwin-x64-profile tools...                            69.7s
Downloading darwin-x64-profile tools...                            23.6s
Downloading darwin-x64-release tools...                            54.3s
Downloading darwin-x64-release tools...                            20.4s
Run Code Online (Sandbox Code Playgroud)

在 macOS 上以调试模式启动 lib/main.dart...Podfile 丢失


当我运行flutter run -d macOS代码时,它显示 Podfile 丢失以及如何修复它?
Mac Pro
如何使用 android studio 运行 mac 桌面应用程序?
如果无法从 android studio 运行 macOS 应用程序,那么我需要使用哪个 ide?

Men*_*ene 5

Podfile missing当您选择命令行工具时,也可能会出现该消息。在这种情况下,可以用以下方法修复

sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
Run Code Online (Sandbox Code Playgroud)

当我切换到 Flutter 2.0 时,这为我解决了这个问题。我flutter create --platforms=macos .之前也跑过,但这并没有解决问题。