debugging 无法在VSCode(:错误:未找到:'dart:ui')

vddsk6oq  于 2022-11-14  发布在  Vscode
关注(0)|答案(1)|浏览(190)

我正在尝试学习Flutter,我已经设置好了环境,我正在使用Andriod Studio模拟器和VSCode运行Flutter文件,我正在使用默认的flutter项目,它运行良好,但当我使用调试运行它时,它不工作,并打印**:错误:未找到:'dart:ui'**
我尝试寻找解决方案,但没有任何效果
完整调试控制台输出:

: Error: Not found: 'dart:ui'
../…/material/animated_icons.dart:10
import 'dart:ui' as ui show Paint, Path, Canvas;
       ^

: Error: Not found: 'dart:ui'
../…/material/animated_icons.dart:11
import 'dart:ui' show lerpDouble;
       ^
: Error: Not found: 'dart:ui'
../…/material/app.dart:5
import 'dart:ui' as ui;
       ^
: Error: Not found: 'dart:ui'
../…/material/app_bar_theme.dart:5
import 'dart:ui' show lerpDouble;
       ^

: Error: Not found: 'dart:ui'
../…/material/arc.dart:6
import 'dart:ui' show lerpDouble;
       ^

: Error: Not found: 'dart:ui'
../…/material/banner_theme.dart:5
import 'dart:ui' show lerpDouble;
       ^

: Error: Not found: 'dart:ui'
../…/material/bottom_app_bar_theme.dart:5
import 'dart:ui' show lerpDouble;
       ^
: Error: Not found: 'dart:ui'
../…/material/bottom_navigation_bar_theme.dart:5
import 'dart:ui' show lerpDouble;
       ^

: Error: Not found: 'dart:ui'
../…/material/bottom_sheet.dart:5
import 'dart:ui' show lerpDouble;
       ^

: Error: Not found: 'dart:ui'
../…/material/bottom_sheet_theme.dart:7
import 'dart:ui' show lerpDouble;
       ^

Exited (254)

Flutter医生结果:

Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 3.3.4, on Microsoft Windows [Version 10.0.19043.2006], locale ar-SA)
[√] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
[√] Chrome - develop for the web
[√] Visual Studio - develop for Windows (Visual Studio Community 2022 17.3.5)
[√] Android Studio (version 2021.3)
[√] VS Code (version 1.72.1)
[√] VS Code, 64-bit edition
[√] Connected device (3 available)
[√] HTTP Host Availability

• No issues found!

也许我需要更新android调试桥?
谢谢帮忙

weylhg0b

weylhg0b1#

我修复了这个问题,虽然我不知道是什么原因造成的,但如果我不得不猜测,这可能是因为我没有正确安装Android调试桥
我确实卸载了所有我下载的Flutter Android工作室SDK的一切,并重新安装他们再次我试图避免这种情况,但我没有找到任何其他方法
如果你有这个问题,我建议你尝试删除和安装adb之前删除一切

相关问题