小编Say*_*ing的帖子

无法使用 VScode 和 Android Studio 模拟器启动我的 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 …
Run Code Online (Sandbox Code Playgroud)

flutter

5
推荐指数
1
解决办法
1万
查看次数

缺少 state.build 的具体实现

我在 Dart 中收到此错误:“缺少“state.build”的具体实现”

第一种方法如下:

class MyHomePage extends StatefulWidget {
  // String titleInput;
  // String amountInput;
  @override
  MyHomePageState createState() => MyHomePageState();
}

class MyHomePageState extends State<MyHomePage> {
  final List<Transaction> _userTransactions = [
    // Transaction(
    //   id: "t1",
    //   title: "New Shoes",
    //   amount: 69.99,
    //   date: DateTime.now(),
    // ),
    // Transaction(
    //   id: "t2",
    //   title: "Weekly Groceries",
    //   amount: 16.53,
    //   date: DateTime.now(),
    // ),
  ];
Run Code Online (Sandbox Code Playgroud)

有谁知道这个错误是什么意思以及如何解决它?

谢谢你。

dart flutter

2
推荐指数
2
解决办法
7931
查看次数

标签 统计

flutter ×2

dart ×1