过去两年我一直在使用 Flutter。但我无法用我的新手机 Vivo V27s (android 13) 解决这个问题。每当我尝试构建我的应用程序时,它都会显示:
Launching lib\main.dart on V2322 in debug mode...
花了很多时间后,它终于构建了应用程序,但出现错误,说:
√ Built build\app\outputs\flutter-apk\app-debug.apk.
I/flutter (20661): The Dart VM service is listening on ************************************
应用程序卡在黑屏。
我尝试使用终端运行我的应用程序:
flutter run
,它可以工作,但热加载和热重启不起作用。
此外,当我放弃该应用程序并从手机上重新运行它时,它就会运行。但热重载和热重启不起作用。输出:
I/flutter (21388): The Dart VM service is listening on ************************************
这是我的
Flutter doctor
输出:
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 3.16.7, on Microsoft Windows [Version 10.0.19045.3803], locale en-US)
[√] Windows Version (Installed version of Windows is version 10 or higher)
[√] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[√] Chrome - develop for the web
[X] Visual Studio - develop Windows apps
X Visual Studio not installed; this is necessary to develop Windows apps.
Download at https://visualstudio.microsoft.com/downloads/.
Please install the "Desktop development with C++" workload, including all of its default components
[√] Android Studio (version 2023.1)
[√] VS Code (version 1.85.1)
[√] Connected device (4 available)
[√] Network resources
! Doctor found issues in 1 category.
使用 adb 卸载您的应用程序
adb uninstall `your app package name`