티스토리 뷰

App/Flutter

'flutter' command not found(MacOS)

Agrafenaaa 2022. 6. 13. 17:55

ISSUE => 'flutter' command is not recognized in terminal after Flutter sdk installation.

 

Solution

1. vi ./zshrc

2. type "i" to change the mode to "INSERT".

3. insert the path below (Please note that double quotes before '$' and after 'bin' could result in error)

export PATH=$PATH:~/Development/flutter/bin

4. type "esc" and ":wq" to exit from the editor. 

5. source ./zshrc

6. (non-obligatory) flutter precache

7. flutter doctor  

 

 

 

+++) flutter doctor --android-licenses to enable Android toolchain above. 

err1) Unable to locate android sdk. 

solution1) install "Android Studio" and add plugins "Dart" & "Flutter".

err2) Android sdkmanager not found. Update to the latest Android SDK and ensure that the cmdline-tools are installed to resolve this.

solution2) check if you've installed "Android SDK Command-line Tools" and "Android Sdk Tools (Obsolete) in Preference of SDK Manager in Android Studio. 

 

 

 

++) If your AOS device is NOT authorized or recoginized after commanding "flutter devices", please go to "Developer options" and unplug your cable from the device and disable "USB debugging" and click it again and reconnect to usb port. You should get a msg with a new pingerfrint something like that.