簡體   English   中英

無法在物理設備或模擬器上運行 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:dart: 找不到 lib /home.dart:1 導入“飛鏢: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 main.dart 或替換為dart:io

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM