无法使用 VScode 和 Android Studio 模拟器启动我的 flutter 应用

Say*_*ing 5 flutter

我无法启动我的 flutter 应用程序,这是当我尝试使用 debug 和不使用 debug 模式运行时收到的消息:

\n

您的启动配置引用了一个不存在的程序。如果启动时遇到问题,请检查“.vscode/launch.json”文件中的“程序”字段。

\n

我的 .json 默认文件:

\n
{\n  // Use IntelliSense to learn about possible attributes.\n  // Hover to view descriptions of existing attributes.\n  // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387\n  "version": "0.2.0",\n  "configurations": [\n    {\n      "name": "Dart",\n      "program": "lib/main.dart",\n      "request": "launch",\n      "type": "dart"\n    }\n  ]\n \n
Run Code Online (Sandbox Code Playgroud)\n

我运行颤振医生:

\n
[!] Android toolchain - develop for Android devices (Android SDK version 29.0.3)\n    ! Some Android licenses not accepted.  To resolve this, run: flutter doctor --android-licenses\n[\xe2\x88\x9a] Android Studio (version 3.6)\n[\xe2\x88\x9a] VS Code (version 1.46.1)\n[\xe2\x88\x9a] Connected device (1 available)\n\n! Doctor found issues in 1 category.\n
Run Code Online (Sandbox Code Playgroud)\n

并接受了所有许可。

\n

谢谢。

\n

小智 1

删除您的 launch.json 文件,然后打开调试菜单并单击创建 launch.json 文件

在此输入图像描述

从下拉列表中选择 dart 和 Flutter 并再次运行应用程序

在此输入图像描述