测试框架意外退出 - MAC 上的 Dart 项目

SEG*_*tra 5 unit-testing intellij-idea dart android-studio flutter

我正在尝试为我的 Flutter 项目开发一个 Dart 包。它只包含 Dart(所以没有 Flutter)代码。

当尝试使用 Android Studio 或 IntelliJ 运行我的单元测试时,我收到以下错误: Test framework quit unexpectedly 在输出窗口中,我收到以下消息:

Testing started at 21:38 ...
/Users/<user>/development/flutter/bin/cache/dart-sdk/bin/pub run test -r json /Users/<user>/Projects/personal/<project dir>/<project>
Observatory listening on http://127.0.0.1:57505/

Could not find a file named "pubspec.yaml" in "/Users/<user>/.pub-cache/hosted/pub.dartlang.org/test-1.5.3".

Process finished with exit code 66
Run Code Online (Sandbox Code Playgroud)

整个.pub-cache目录甚至不存在...

我如何让测试工作?

SEG*_*tra 0

我已经下载了单独的 Dart SDK,并配置了 Android Studio 和 IntelliJ 来使用它,而不是 Flutter 附带的 SDK。

现在测试又开始工作了。