You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Hot Reload don't work in AndroidStudio 3.3.2 ( In Windows) #29121
My environment is wIndow + AndroidStudio 3.3.2, everything is ok, but Hot Reload don't work.
The small lightning icon is displayed normally ,it's also clickable.
And the console display :
"Initializing hot reload...
Syncing files to device Android SDK built for x86...
Reloaded 2 of 568 libraries in 1,181ms."
But there is no reload of the modified content on the emulator.
Please help me.
@VNAPNIC please avoid comments like "me too" or "+1", which ends up notifying everyone subscribed to this issue.. Instead, upvote the original issue, which helps us better triage the issue and gauge how many people it's affecting.
@JeeseC how do you verify if hot reload worked? What did you try to change & what is the expected & actual output? Stating from the log message above, it seems to work well.
Do note that stateful widgets may require a restart, not a reload, if you change underlying implementation. Alternatively, just navigate out and back into the specific area of your App.
@ened I just change some words of the textview, and then click the Hot reload button. But the simulator display nothing to change, so I think the hot reload don't work.
The hot restart work well.
I have the same problem that when I change my code and save(Ctrl + S), it not reload. I must press the hot reload icon it will work.
it output when I run flutter doctor -v
[√] Flutter (Channel stable, v1.2.1, on Microsoft Windows [Version 10.0.17134.619], locale zh-CN)
• Flutter version 1.2.1 at D:\flutter
• Framework revision 8661d8aecd (3 weeks ago), 2019-02-14 19:19:53 -0800
• Engine revision 3757390fa4
• Dart version 2.1.2 (build 2.1.2-dev.0.0 0a7dcf17eb)
[√] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
• Android SDK at D:\Android\Sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-28, build-tools 28.0.3
• ANDROID_HOME = D:\Android\Sdk
• Java binary at: D:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1248-b01)
• All Android licenses accepted.
[√] Android Studio (version 3.3)
• Android Studio at D:\Program Files\Android\Android Studio
• Flutter plugin version 33.3.1
• Dart plugin version 182.5215
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1248-b01)
[√] Connected device (1 available)
• STF AL10 • 5JPDU17712006976 • android-arm64 • Android 8.0.0 (API 26)
• No issues found!
thanks for response ! when I save my code , nothing will show in the debug console . but I press the hot reload icon it show Reloaded 3 of 558 libraries in 1,163ms.. This problem happen in vscode and AndroidStudio, even though I create a new flutter project. I think it's not the problem of editor.
The VS Code v1.32 issue is a bug in VS Code and unrelated to hot reload not working in Android Studio (though I appreciate it seems coincidental for both to crop up within a few days). The VS Code issue will be fixed with a VS Code recovery release soon (see VS Code February 2019 Recovery 2 Endgame) and does not require a Flutter or VS Code extension fix.
I don't think the cause of this issue in Android Studio is clear yet. Can you clarify whether you can repro this issue from the command line (using flutter run) and exactly what changes you're making that aren't applying when reloading, to make sure we can test the same thing?
@devoncarew@jacob314 is there a way to get Android Studio to log the flutter run output?
Hey guys, I've had the same problem after installing flutter and Android Studio a couple of days ago. Since I just started a course and coding with Flutter for the first time, Hot Reload would not work in vscode or Android Studio when I changed and saved my main.dart file.
However, as soon as I started using a new dart file that was imported into the main.dart one, Hot Reload started working.
So, in my case, Hot Reload does not work in vscode or Android Studio when I save the main.dart file. It works with other files of the project.
@DanTup I guess that was the issue because the code was written inside the main() method until it was time to move it to a separate file. Kind of like:
There's definitely some issue with plugin, it just sometimes stops listening to IDE save event.
At some point in time hitting save stops triggering the reload (which is still fully functional using icon).
Re-plugging the phone as well as re-running the code doesn't help.
Restarting AS makes it work again for some time.
This usually happens after making changes for top-level functions/constants which i guess can't be hot-reloaded, but such situations shouldn't break the plugin's save on reload part at all.
Also might happen after phone being unplugged.
I can use Hot Reload in some root page, but not useful in deep route page in Android
[√] Flutter (Channel master, v1.3.14-pre.7, on Microsoft Windows [Version 10.0.17134.648], locale zh-CN)
• Flutter version 1.3.14-pre.7 at D:\flutter
• Framework revision ee3e621 (28 hours ago), 2019-03-18 21:40:21 -0700
• Engine revision 5088735
• Dart version 2.2.1 (build 2.2.1-dev.1.1 None)
[√] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
• Android SDK at C:\Users\wangk\AppData\Local\Android\Sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-28, build-tools 28.0.3
• ANDROID_HOME = C:\Users\wangk\AppData\Local\Android\Sdk
• Java binary at: D:\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06)
• All Android licenses accepted.
[√] Android Studio (version 3.2)
• Android Studio at D:\Android\Android Studio
• Flutter plugin version 31.3.1
• Dart plugin version 181.5656
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06)
Hot Reload is useful and nomal in root project app_home_page and app-login .
But no use for the subprocject app_base,advertising_material,base_info ,etc.
In the subprocject change file ,it will show Reloaded 0 of 1291 libraries in xxxms.
and nothing to change(AndroidStudio and Vs code all not work ).
It become this after I upgrade Flutter version in Flutter version 1.3.14-pre.7
For flutter hot reload problems that may be happening with your project,
It is a problem with your device, and not flutter or Android Studio
This happens when your logcat hangs up.
You might want to increase your buffer size.
To do this, go into your device or emulator:
Settings > Developer options (Ensure they are turned on),
Change the buffer size to a higher number.
Then run flutter run -v again
Without more information, we're not sure how to proceed with this issue. If you're still experience this, please file a new issue with all relevant fields included, along with flutter doctor and a complete snippet that reproduces the issue
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.
Activity
smew-tech commentedon Mar 10, 2019
dnfield commentedon Mar 10, 2019
@VNAPNIC please avoid comments like "me too" or "+1", which ends up notifying everyone subscribed to this issue.. Instead, upvote the original issue, which helps us better triage the issue and gauge how many people it's affecting.
dnfield commentedon Mar 10, 2019
@JeeseC can you share the output of
flutter doctor -v?JeeseC commentedon Mar 11, 2019
[√] Flutter (Channel stable, v1.2.1, on Microsoft Windows [Version 6.1.7601], locale zh-CN)
• Flutter version 1.2.1 at F:\flutter
• Framework revision 8661d8a (3 weeks ago), 2019-02-14 19:19:53 -0800
• Engine revision 3757390
• Dart version 2.1.2 (build 2.1.2-dev.0.0 0a7dcf17eb)
ened commentedon Mar 11, 2019
@JeeseC how do you verify if hot reload worked? What did you try to change & what is the expected & actual output? Stating from the log message above, it seems to work well.
Do note that stateful widgets may require a
restart, not areload, if you change underlying implementation. Alternatively, just navigate out and back into the specific area of your App.JeeseC commentedon Mar 11, 2019
@ened I just change some words of the textview, and then click the Hot reload button. But the simulator display nothing to change, so I think the hot reload don't work.
The hot restart work well.
dulinxi commentedon Mar 11, 2019
I have the same problem that when I change my code and save(Ctrl + S), it not reload. I must press the hot reload icon it will work.
it output when I run
flutter doctor -vDanTup commentedon Mar 11, 2019
I can't repro on my PC and an Android 7.1 physical device. I created a new Flutter app using the wizard and made changes to the text and clicked save.
Just trying to get an Android 8 emulator to work.Same in an Android 8.0 emulator, seemed to work fine.Can anyone reproduce it from the terminal with
flutter run, or only in Android Studio?dnfield commentedon Mar 11, 2019
/cc @jacob314 - this seems like a possible AS plugin issue
dulinxi commentedon Mar 12, 2019
thanks for response ! when I save my code , nothing will show in the debug console . but I press the hot reload icon it show
Reloaded 3 of 558 libraries in 1,163ms.. This problem happen in vscode and AndroidStudio, even though I create a new flutter project. I think it's not the problem of editor.jonahwilliams commentedon Mar 12, 2019
If you're noticing that hot restart is working and not hot reload, then it would be helpful if you shared the code you are trying to hot reload.
If hot restart works, then does hot reload work following that hot restart?
JeeseC commentedon Mar 12, 2019
@jonahwilliams Thanks for response! The code in link:
After hot restart work well, hot reload still don't work.
5 remaining items
DanTup commentedon Mar 13, 2019
@JeeseC
The VS Code v1.32 issue is a bug in VS Code and unrelated to hot reload not working in Android Studio (though I appreciate it seems coincidental for both to crop up within a few days). The VS Code issue will be fixed with a VS Code recovery release soon (see VS Code February 2019 Recovery 2 Endgame) and does not require a Flutter or VS Code extension fix.
I don't think the cause of this issue in Android Studio is clear yet. Can you clarify whether you can repro this issue from the command line (using
flutter run) and exactly what changes you're making that aren't applying when reloading, to make sure we can test the same thing?@devoncarew @jacob314 is there a way to get Android Studio to log the
flutter runoutput?Ruzo commentedon Mar 14, 2019
Hey guys, I've had the same problem after installing flutter and Android Studio a couple of days ago. Since I just started a course and coding with Flutter for the first time, Hot Reload would not work in vscode or Android Studio when I changed and saved my main.dart file.
However, as soon as I started using a new dart file that was imported into the main.dart one, Hot Reload started working.
So, in my case, Hot Reload does not work in vscode or Android Studio when I save the main.dart file. It works with other files of the project.
DanTup commentedon Mar 14, 2019
@Ruzo What did your
main.dartlook like? Changes directly in themain()method won't work (see here), asmainis not re-executed during a hot reload.If what you'er seeing isn't described by that, could you provide some sample code of what didn't work? Thanks!
Ruzo commentedon Mar 14, 2019
@DanTup I guess that was the issue because the code was written inside the main() method until it was time to move it to a separate file. Kind of like:
Sorry. It was just a beginner's ignorance.
DanTup commentedon Mar 14, 2019
@Ruzo Thanks for confirming! I made this same mistake too :-)
@JeeseC might this explain your original issue too? Can you give an example of the changes you were making?
BufferUnderflower commentedon Mar 19, 2019
There's definitely some issue with plugin, it just sometimes stops listening to IDE save event.
At some point in time hitting save stops triggering the reload (which is still fully functional using icon).
Re-plugging the phone as well as re-running the code doesn't help.
Restarting AS makes it work again for some time.
This usually happens after making changes for top-level functions/constants which i guess can't be hot-reloaded, but such situations shouldn't break the plugin's save on reload part at all.
Also might happen after phone being unplugged.
wk1017553772 commentedon Mar 20, 2019
I can use Hot Reload in some root page, but not useful in deep route page in Android
DanTup commentedon Mar 20, 2019
Can you provide sample code showing the issue that we can try to reproduce with?
wk1017553772 commentedon Mar 22, 2019
In my project depend local Library each other,flutter-app is root project
flutter-app pubspec.yaml:
app_home_page pubspec.yaml:
Hot Reload is useful and nomal in root project app_home_page and app-login .
But no use for the subprocject app_base,advertising_material,base_info ,etc.
In the subprocject change file ,it will show
Reloaded 0 of 1291 libraries in xxxms.and nothing to change(AndroidStudio and Vs code all not work ).
It become this after I upgrade Flutter version in Flutter version 1.3.14-pre.7
sceyhuns commentedon Nov 9, 2019
For flutter hot reload problems that may be happening with your project,
It is a problem with your device, and not flutter or Android Studio
This happens when your logcat hangs up.
You might want to increase your buffer size.
To do this, go into your device or emulator:
Settings > Developer options (Ensure they are turned on),
Change the buffer size to a higher number.
Then run flutter run -v again
jonahwilliams commentedon Jan 9, 2020
Without more information, we're not sure how to proceed with this issue. If you're still experience this, please file a new issue with all relevant fields included, along with flutter doctor and a complete snippet that reproduces the issue
github-actions commentedon Aug 17, 2021
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.