简体   繁体   English

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

[英]can't run flutter app on physical device or emulator

I've been trying to run some basic flutter code on a physical device (was working a few days ago) I am kinda new to flutter and I am left with this error message.我一直在尝试在物理设备上运行一些基本的 flutter 代码(几天前工作)我对 flutter 有点陌生,我留下了这条错误消息。 Invalid depfile: /mnt/2d3f0752-b6d9-49f5-94cc-f85e942a8495/home/abdullah/UIA/212/MAD/mad_assignment/.dart_tool/flutter_build/10a98dcd0759222e9209b6893a2ed34e/kernel_snapshot.d: Error: Not found: 'dart:html' lib/home.dart:1 import 'dart:html';无效的 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

Remove dart:html from main.dart .从 main.dart 中删除dart:html main.dart or replace it with dart:io或替换为dart:io

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 无法在模拟器或真实设备中运行Flutter应用程序 - Can't run Flutter app in emulator or real device Flutter 应用无法在真机或模拟器上运行 - Flutter app can't run on real device or emulator Flutter 应用程序在 Android 模拟器上运行,但不在物理设备上(OnePlus 7T) - Flutter app is running on Android Emulator but not on Physical Device (OnePlus 7T) 仅在物理设备而非模拟器上运行 Android 应用 - Run Android app Only on Physical Device not Emulator Flutter 新应用在选择 Android 物理设备时无法运行 - Flutter new app can't run when choose Android physical device Flutter 应用程序在 android 工作室模拟器上完美运行,但 go 无法通过物理设备上的加载屏幕 - Flutter app runs perfectly on android studio emulator but doesn't go past the loading screen on physical device 无法通过隧道在物理设备上运行我的本机应用程序 - Can't run my react native app on physical device by tunnel 无法在 Android 模拟器或 Android 物理设备中运行 Flutter 项目 - Not able to run Flutter Project in Android Emulator or Android Physical Device Flutter 应用程序在模拟器(Pixel 4)上呈现良好,但在物理设备上溢出 - Flutter app renders fine on the emulator (Pixel 4) but overflows on physical device 如何在 Android Studio 中将我的物理设备作为模拟器运行? - How can I run my physical device as an emulator in Android studio?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM