Flutter "can not heat load (hot reload), thermal overloads and can not click on the gray button" solution set to go Mac terminal agent

Thermal overload preface, Flutter's (hot reload) can help you quickly and easily tested without the need to restart the application to build the user interface, add features and fix bugs.

Thermal overload is achieved by the source code files updated injected into a running Dart virtual machine (VM) in.

After using the new update of fields and functions like a virtual machine, Flutter framework will automatically rebuild the widget tree, so you can quickly see the effect of the change.

To override a hot Flutter application:

  1. From a supported IntelliJ IDE, Android Studio or terminal window run the application. Physical or virtual machine can run.

  2. Dart modify a file in the project. Most types of code changes can be reloaded; about the need to change the list of fully restart, see the restrictions .

  3. If you are using IntelliJ IDE, Android Studio, select the Save All  ( cmd-s/ ctrl-s)), or Hot Reload button on the toolbar.

A phenomenon:

Flutter can not load thermal overload hot button gray, not clickable.

 

 

Second, analysis Cause:

终端 flutter doctor show NO_PROXY is not set

Not set agentless port

终端:flutter doctor

  ~ flutter doctor                                   

Doctor summary (to see all details, run flutter doctor -v):

[✓] Flutter (Channel stable, v1.7.8, on Mac OS X 10.14.3 18D109, locale

    Hans-zh-CN)

 

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.1)

[✓] Xcode - develop for iOS and macOS (Xcode 10.2.1)

[✓] iOS tools - develop for iOS devices

[✓] Android Studio (version 3.5)

[✓] VS Code (version 1.41.1)

[!] Proxy Configuration

    ! NO_PROXY is not set

[✓] Connected device (1 available)

 

! Doctor found issues in 1 category.

 重点在于:NO_PROXY is not set

Third, the solution:

Set  NO_PROXY to

1. Start the terminal

2. Enter the current user's home directory

or cd ~ cd / users / YourMacUserName

3. Enter the touch .bash_profile

Viewing and editing .bash_profile

1. Input terminal open -e .bash_profile

2. Edit the file, add 

export no_proxy="localhost,127.0.0.1"

3. Close Save

Last updated environment variable configuration

Input: Source .bash_profile

 

Do not understand this, then look here set to go Mac terminal agent

As follows:

  ~ cd ~ 

  ~ touch .bash_profile

  ~ open -e .bash_profile

  ~ source .bash_profile

  ~ flutter doctor                       

Doctor summary (to see all details, run flutter doctor -v):

[✓] Flutter (Channel stable, v1.7.8, on Mac OS X 10.14.3 18D109, locale

    Hans-zh-CN)

 

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.1)

[✓] Xcode - develop for iOS and macOS (Xcode 10.2.1)

[✓] iOS tools - develop for iOS devices

[✓] Android Studio (version 3.5)

[✓] VS Code (version 1.41.1)

[✓] Proxy Configuration

[✓] Connected device (1 available)

 

No issues found!

  ~ 

 

Fourth, verification

Runtime, hot reload button turns orange, you can click on.

Shortcuts save editing, auto-reload.

 

 

1. Start the terminal

2. Enter the current user's home directory

or cd ~ cd / users / YourMacUserName

3. Enter the touch .bash_profile

Viewing and editing .bash_profile

1. Input terminal open -e .bash_profile

2. Edit the file, add 

export no_proxy="localhost,127.0.0.1"

3. Close Save

Last updated environment variable configuration

Input: Source .bash_profile

 

Do not understand this, then look here set to go Mac terminal agent

As follows:

Guess you like

Origin www.cnblogs.com/jukaiit/p/12169205.html