Issue
I have a flutter project that I created from Android Studio. But when I make some changes and hit Ctrl + S for saving, Hot reload isn't working even though I have checked the checkbox Hot Reload on Save from preferences. However this was working fine previously. In between something messed up and now it isn't. Now I see when I run a project the yellow lightening icon for hot reload on Android Studio menu itself stays disabled.
Below is the log from my Run Console:
Launching lib\main.dart on Redmi 8 in debug mode...
Running Gradle task 'assembleDebug'...
√ Built build\app\outputs\apk\debug\app-debug.apk.
Installing build\app\outputs\apk\app.apk...
This is taking longer than expected...
And here is the flutter doctor summery:
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, v1.12.13+hotfix.7, on Microsoft Windows [Version 10.0.14393], locale en-US)
[√] Android toolchain - develop for Android devices (Android SDK version 29.0.1)
[√] Android Studio (version 3.5)
[√] Proxy Configuration
[√] Connected device (1 available)
• No issues found!
Has anyone faced this issue before? Any solutions?
Solution
Finally I fixed it. The issue was with the proxy settings. I had the environment variable NO_PROXY set on my machine as 127.0.0.1;localhost instead of 127.0.0.1,localhost (Notice the semi-colon instead of the coma). The local host addresses with a semi-colon seems like a value the flutter SDK doesn't understand as a valid NO_PROXY address which was causing my issue. Once I changed the semi-colon to coma it worked like a charm.
How did I figure it out?
From my Run Console I could see it saying This is taking longer than expected... which seemed abnormal and with little google search I found that is already a well know issue and people have fixed it. See this github forum question. There it is advised to keep the proxy addresses with a coma and not with a semi-colon. And that's it.
Answered By - Sisir
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.