无法在IntelliJ IDEA中运行新的颤振示例代码

Nav*_*ian 1 java intellij-idea flutter

我安装了IntelliJ IDEA,下载了flutter和dart插件,安装了android studio和jdk.我打开配置的IntelliJ IDEA指向android sdk和jdk.
我打开了IntelliJ IDEA并创建了新项目 - > flutter.我点击了构建并收到了一条错误消息.

我使用的是Ubuntu 16.04 64位系统

我跑了Flutter Doctor并确认我没有任何新的或缺少安装.调试器中的消息如图所示

The built-in library 'dart:ui' is not available on the stand-alone VM. 
library handler failed export 'dart:ui' show Locale
Process finished with exit code 254 Failed to connect to the VM observatory service: java.io.IOException: Failed to connect: ws://127.0.0.1:46579/ws Caused by: de.roderick.weberknecht.WebSocketException: error while creating socket to ws://127.0.0.1:46579/ws Caused by: java.net.ConnectException: Connection refused
Run Code Online (Sandbox Code Playgroud)

带输出的标准新颤振项目代码

我复制粘贴的调试器输出

小智 6

单击测试的名称,然后选择"编辑配置"您(可能)会注意到运行配置位于"dart"而不是"flutter test"

删除这个,在"Flutter Test"下创建一个新的(使用加号按钮),然后手动选择/运行.

(此外,您需要在名为'test'的文件夹中将测试放在lib文件夹的同一级别(例如,作为姐妹),并按照命名约定'*_test.dart'进行所有测试.)

快乐的编码!


Col*_*son 5

听起来 IntelliJ 被配置为作为 Dart 命令行应用程序而不是 Flutter 应用程序运行。编辑配置并删除任何看起来像“Dart 命令行应用程序”的配置。然后为 Flutter 应用程序创建一个新的。