Flutter performing hot restart instead of hot reload - flutter

I just updated my flutter folder from 2.15 to 3.0. My app runs fine but there's a big problem: when I do CTRL+S, instead of reload my current page to see the changes, it's restarting my whole app, which is extremely annoying. This didn't happen until the upgrade so thought it was a problem of Flutter 3.0. But I downgraded to the version 2.15 and it keeps restarting instead of reloading.
Here's my "flutter doctor":
[√] Flutter (Channel stable, 2.10.5, on Microsoft Windows [Versión 10.0.19041.264], locale es-AR)
[√] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1)
[√] Chrome - develop for the web
[X] Visual Studio - develop for Windows
X Visual Studio not installed; this is necessary for Windows development.
Download at https://visualstudio.microsoft.com/downloads/.
Please install the "Desktop development with C++" workload, including all of its default components
[√] Android Studio (version 2020.3)
[√] Android Studio (version 2021.2)
[√] VS Code (version 1.67.1)
[√] Connected device (3 available)
[√] HTTP Host Availability
I also tried running "flutter clean" and "flutter pub get" but it's the same. It says "Performing hot reload" but it actually performs a full restart. I can't work anymore like this.

Related

Flutter: minor errors when launching app to Android emulator

When I launch an app to an Android emulator, I get the following two error messages, but the app works fine:
E/SurfaceSyncer( 6710): Failed to find sync for id=0
W/Parcel ( 6710): Expecting binder but got null!
Environment: Windows 11, AMD Ryzen 6000
Flutter doctor output:
[✓] Flutter (Channel stable, 3.3.6, on Microsoft Windows [Version 10.0.22621.674], locale en-AU)
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
[✓] Chrome - develop for the web
[✗] Visual Studio - develop for Windows
✗ Visual Studio not installed; this is necessary for Windows development.
Download at https://visualstudio.microsoft.com/downloads/.
Please install the "Desktop development with C++" workload, including all of its default components
[✓] Android Studio (version 2021.3)
[✓] VS Code (version 1.72.2)
[✓] Connected device (4 available)
[✓] HTTP Host Availability
No errors occur if I instead launch to Chrome.
Any ideas?
Have you installed Visual Studio? This contains the 'Desktop development with C++' which flutter seems to require. (Visual Studio != Visual Studio Code)

Gitlab Runner : The current Flutter SDK version is 0.0.0-unknown. - CI/CD

I am trying to execute a .gitlabci.yml file with Gitlab Runner.
But I am getting this error message.
No dependencies changed.
1 package is discontinued.
57 packages have newer versions incompatible with dependency constraints.
Try `dart pub outdated` for more information.
Running "flutter pub get" in tardis...
The current Flutter SDK version is 0.0.0-unknown.
Because newApp depends on workmanager >=0.2.3 which requires Flutter SDK version >=1.10.0, version solving failed.
In short gitlab runner cannot detect my flutter version.
My flutter doctor screen:
[√] Flutter (Channel stable, 2.10.5, on Microsoft Windows [Version 10.0.19044.1766], locale tr-TR)
[√] Android toolchain - develop for Android devices (Android SDK version 32.0.0)
[√] Chrome - develop for the web
[√] Visual Studio - develop for Windows (Visual Studio Community 2019 16.9.1)
[√] Android Studio (version 2020.3)
[√] VS Code (version 1.68.1)
[√] Connected device (3 available)
[√] HTTP Host Availability
• No issues found!
How can i fix this?
Solved this problem. Perhaps, the GitLab runner cannot detect my flutter version because of the flutter SDK location. I moved the SDK from drive D to drive C and specified the new environment variable path. It works fine now.

Why flutter take so much ram to build the grable build after second time I opened the project

When I create the new file of the flutter project the first time it's run smoothly and no issues occur, when I start these projects again after some period of time, the Gradle build is stuck and so much ram usage by the OpenJDK binary platform. After some time pc crashed.
Task manager screenshot
Here is the flutter doctor's output
[✓] Flutter (Channel stable, 2.10.4, on Microsoft Windows [Version 10.0.22000.556], locale en-US)
[!] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1)
✗ cmdline-tools component is missing
Run `path/to/sdkmanager --install "cmdline-tools;latest"`
See https://developer.android.com/studio/command-line for more details.
✗ Android license status unknown.
Run `flutter doctor --android-licenses` to accept the SDK licenses.
See https://flutter.dev/docs/get-started/install/windows#android-setup for more details.
[✓] Chrome - develop for the web
[✗] Visual Studio - develop for Windows
✗ Visual Studio not installed; this is necessary for Windows development.
Download at https://visualstudio.microsoft.com/downloads/.
Please install the "Desktop development with C++" workload, including all of its default components
[✓] Android Studio (version 2021.1)
[✓] IntelliJ IDEA Community Edition (version 2021.3)
[✓] VS Code (version 1.66.2)
[✓] Connected device (4 available)
[✓] HTTP Host Availability
So please tell me how do I fix it?

vs code not integrating with AVD Emulators

I replaced flutter folder with an older version then Visual Studio Code stopped showing available devices ("No device" not clickable) when I click to run my app so I have to manually start the emulator on Android Studio (AVD) for Visual Studio Code to connect. Before the downgrade everything worked fine and I didn't have to open android studio for Visual Studio Code to connect to emulators.
flutter doctor :
C:\Users\Workstudio>flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, v1.12.13+hotfix.9, on Microsoft Windows [Version 10.0.19042.928], locale en-US)
[√] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
[√] Android Studio (version 3.5)
[√] VS Code, 32-bit edition (version 1.57.1)
[!] Connected device
! No devices available
! Doctor found issues in 1 category.
Things I've tried:
Reinstall HAXM.
adb server-kill & adb server-start
checked environmental variables(paths & Android home).
Updating Android SDK.

Flutter error after running Flutter Doctor

I use flutter to develop windows desktop programs, I installed visual studio 2019 enterprise, fully installed, more than 50G. I just installed the part that can change the path on the D drive. But after executing flutter doctor, why does the following prompt appear?
error:
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel dev, 1.23.0-7.0.pre, on Microsoft Windows [Version 10.0.18363.1082], locale zh-CN)
[!] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
! Some Android licenses not accepted. To resolve this, run: flutter doctor --android-licenses
[!] Visual Studio - develop for Windows (Visual Studio Enterprise 2019 16.0.0)
X The current Visual Studio installation is incomplete. Please reinstall Visual Studio.
[√] Android Studio (version 4.0)
[!] IntelliJ IDEA Community Edition (version 2019.3)
X Flutter plugin not installed; this adds Flutter specific functionality.
X Dart plugin not installed; this adds Dart specific functionality.
[√] IntelliJ IDEA Ultimate Edition (version 2018.1)
[√] Connected device (1 available)
! Doctor found issues in 3 categories.
That specific error message from doctor means that the vswhere tool is reporting false for the isComplete property. This means there is an issue with your Visual Studio installation (or at least, Microsoft's tooling believes there is).