简体   繁体   English

热重载和热重启在 flutter 中不起作用

[英]hot reload and hot restart not working in flutter

Problem 1:问题一:
When I click run button to build the app.当我点击运行按钮来构建应用程序时。 my app build successfully.我的应用程序构建成功。 it install in my real device but it stack in splash screen not going to next screen.它安装在我的真实设备中,但它堆叠在启动画面中,不会进入下一个屏幕。 and terminal shows和终端显示

"Observatory listening on ************************************"

Step 1: clicking the run icon第一步:点击运行图标

Step 2: after build the app it show第 2 步:构建应用程序后显示

"Observatory listening on ************************************"

Problem 2:问题二:

But when I run flutter run comment in terminal my app will work properly but hot reload and hot restart not work.但是当我在终端运行 flutter run comment 时,我的应用程序将正常运行,但热重载和热重启不起作用。

Terminal Error:终端错误:

C:\Users\asifa\AndroidStudioProjects\asifzakirpatientapp>flutter run
Launching lib\main.dart on V2025 in debug mode...
Running Gradle task 'assembleDebug'...
Running Gradle task 'assembleDebug'... Done                        57.3s
√ Built build\app\outputs\flutter-apk\app-debug.apk.
Installing build\app\outputs\flutter-apk\app.apk...                11.0s
I/flutter (23089): Observatory listening on ************************************

When using the terminal to run flutter run , it won't automatically hot reload and hot restart on save.使用终端运行flutter run时,保存时不会自动热重载和热重启。 You need to press r to hot reload on your terminal and R to hot restart.您需要按r在您的终端上热重新加载,并按R热重启。 To disconnect your emulator, press d on your terminal.要断开模拟器,请在终端上按d

Much thankfulness to you for a serious incredible outright for sharing this one really all-around spread out all peaceful data, I genuinely like it, Thanks for sharing.非常感谢您以令人难以置信的方式彻底分享这个真正全方位的和平数据,我真的很喜欢它,谢谢分享。 https://www.girlsplace.in https://www.girlsplace.in

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM