不能 运行 在物理设备或模拟器上运行 flutter 应用程序

can't run flutter app on physical device or emulator

我一直在尝试 运行 物理设备上的一些基本 flutter 代码(几天前工作)我对 flutter 有点陌生,但留下了这条错误消息。 无效的 depfile:/mnt/2d3f0752-b6d9-49f5-94cc-f85e942a8495/home/abdullah/UIA/212/MAD/mad_assignment/.dart_tool/flutter_build/10a98dcd0759222e9209b6893a2ed34e/kernel_snapshot.d :错误:未找到:'dart:html' lib/home.飞镖:1 导入 'dart:html';

    [flutter] flutter doctor -v
    [✓] Flutter (Channel stable, 2.10.3, on Ubuntu 20.04.4 LTS 5.13.0-44-generic, locale en_US.UTF-8)
• Flutter version 2.10.3 at /home/fawrama/snap/flutter/common/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 7e9793dee1 (3 months ago), 2022-03-02 11:23:12 -0600
• Engine revision bd539267b4
• Dart version 2.16.1
• DevTools version 2.9.2

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0-rc4)
• Android SDK at /home/fawrama/Android/Sdk
• Platform android-Tiramisu, build-tools 33.0.0-rc4
• Java binary at: /snap/android-studio/121/android-studio/jre/bin/java
• Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)
• All Android licenses accepted.

[✓] Chrome - develop for the web
• Chrome at google-chrome

[✓] Android Studio (version 2021.1)
• Android Studio at /snap/android-studio/119/android-studio
• Flutter plugin version 65.2.2
• Dart plugin version 211.7808
• Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7590822)

[✓] Android Studio (version 2021.2)
• Android Studio at /snap/android-studio/121/android-studio
• Flutter plugin version 67.1.2
• Dart plugin version 212.5744
• Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)

[✓] IntelliJ IDEA Community Edition (version 2022.1)
• IntelliJ at /snap/intellij-idea-community/361
• Flutter plugin can be installed from:
   https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
   https://plugins.jetbrains.com/plugin/6351-dart

[✓] VS Code
• VS Code at /snap/code/current
• Flutter extension version 3.40.0

[✓] Connected device (2 available)
• SM A325F (mobile) • RR8RC0EA1SA • android-arm64  • Android 11 (API 30)
• Chrome (web)      • chrome      • web-javascript • Google Chrome 102.0.5005.61

[✓] HTTP Host Availability
• All required HTTP hosts are available

• No issues found!
exit code 0

main.dart 中删除 dart:html。或替换为 dart:io