我在运行这个项目时遇到了问题

flutter pub run build_runner build --delete-conflicting-outputs

该命令没有出错,但被卡在第一个文件中:

WARNING] No actions completed for 15.0s, waiting on:
  - auto_route_generator:autoRouteGenerator on lib/ui/shared/ui_helpers.dart
  - auto_route_generator:autoRouteGenerator on lib/ui/views/settings/settings_datamodel.dart
  - auto_route_generator:autoRouteGenerator on lib/ui/views/settings/settings.dart
  - auto_route_generator:autoRouteGenerator on lib/ui/views/review_invitation/review_invitation_datamodel.dart
  - auto_route_generator:autoRouteGenerator on lib/ui/views/review_invitation/review_invitation.dart
  .. and 9 more

[INFO] 1m 17s elapsed, 1/15 actions completed.

以下是我的pubspec:

dependencies:
  flutter:
    sdk: flutter

  # see below for explanation
  stacked_services:
  auto_route:
  stacked: ^1.7.6
  stacked_hooks: 0.1.1+3
  flutter_hooks:
  get_it:
  injectable:
  validators: ^2.0.0 

  # The following adds the Cupertino Icons font to your application.
  # Use with the CupertinoIcons class for iOS style icons.
  cupertino_icons: ^0.1.3

dev_dependencies:
  flutter_test:
    sdk: flutter

  build_runner:
  auto_route_generator:
  injectable_generator:

而这是我的路由的课程.dart

import 'package:auto_route/auto_route_annotations.dart';
import 'package:myapp/ui/views/StartupView.dart';

@MaterialAutoRouter(
  routes: <AutoRoute>[
    MaterialRoute(page: StartupView, initial: true),
  ],
)
class $Router {}

有什么建议吗?

推荐答案

flutter pub upgrade美元解决了我的问题.

Dart相关问答推荐

Dart 可空记录与模式匹配:(String, int)?类型的匹配值无法分配给所需类型(Object?, Object?)

切换到可靠的零安全后简单分配中的可空性不匹配

MappedListIterable 不是子类型

Flutter:合并两张图片,作为单张图片存储在本地存储中

'T'、'f'、'E'、'e'、'→' 在 dart/flutter 文档中代表什么?

为http POST请求从Flutter上的TextFormField捕获数据

在Flatter中滚动列表视图时,网络图像一直消失?

Flutter:如何检测键盘按键?

如何组织混合HTTP服务器+web客户端Dart元素文件?

在 Flutter 中推送新页面时,Navigator 堆栈上的页面会重建

Expansion Panel底部溢出

参数类型Map Function()不能分配给参数类型Map

是否有必要为Flatter安装Android Studio,或者可以用什么替代Android Studio?

如何用dart语言初始化超类变量?

VS Code 首选项的位置

Dart:并行处理传入的 HTTP 请求

在 Dart 中升序和降序排序?

GWT 与 Dart - 主要区别是什么? Dart 是 GWT 的潜在替代品吗?

如何在 Dart 中创建私有变量?

如何在 Dart 中合并两个列表?