Flutter macOS 插件

Gij*_*gen 3 macos plugins flutter

我正在制作一个必须支持 macOS 的 Flutter 插件。但是,当我想创建一个插件并在示例应用程序中运行该插件时(即使我没有编辑由 Flutter 生成的代码),Xcode 会抛出以下错误。

\n

无法加载文件列表的内容:\'/Users/admin/../example/macos/ephemeral/FlutterInputs.xcfilelist\'

\n

无法加载文件列表的内容:\'/Users/admin/../example/macos/ephemeral/FlutterOutputs.xcfilelist\'

\n

Xcode错误截图

\n

这是我的 Flutter 医生:

\n
Doctor summary (to see all details, run flutter doctor -v):\n[\xe2\x9c\x93] Flutter (Channel dev, 1.21.0-9.0.pre, on Mac OS X 10.15.3 19D76, locale\n    nl-NL)\n[\xe2\x9c\x93] Android toolchain - develop for Android devices (Android SDK version 29.0.2)\n[\xe2\x9c\x93] Xcode - develop for iOS and macOS (Xcode 11.5)\n[\xe2\x9c\x93] Chrome - develop for the web\n[\xe2\x9c\x93] Android Studio (version 3.5)\n[\xe2\x9c\x93] VS Code (version 1.48.0)\n[\xe2\x9c\x93] Connected device (3 available)\n\n\xe2\x80\xa2 No issues found!\n
Run Code Online (Sandbox Code Playgroud)\n

Fou*_*urj 16

我找到了另一个解决方案:在 Xcode 中构建之前运行 flutter build 命令flutter build macos,然后出现这些输入/输出文件。

  • FlutterInputs.xcfilelist
  • FlutterOutputs.xcfilelist