Skip to content Skip to sidebar Skip to footer

How To Give Flutter Sdk Path In Android Studio On Mac Os

I have installed the Android studio and the plugin's DART,FLUTTER to kickstart the flutter but as i am not able to give path of sdk while creating my very first project for flutter

Solution 1:

I tried to find out the solution did not got solution.. Finally this are the steps i have implemented and works for me. Prerequisites :-

  1. Install Android studio

  2. Install plugins to kick start flutter projects (DART,FLUTTER)

You can find out this inside android studio --> preferences --> Plugins

Now you have to setup Flutter SDK path to your Android studio

  1. Download the Flutter SDK

  2. Extract it where do you want (for example - /Users/vrushali/Downloads/flutter)

  3. Open your Android studio --> start a new Flutter Project --> select default application --> next --> select flutter sdk path --> browse to the . location where you have download and extract your flutter sdk --> select the flutter --> bin --> and say okay All set..! Your project will get created in some time :)

Solution 2:

Theres a better way if you want to skip

Open your Android studio --> start a new Flutter Project --> select default application --> next --> select flutter sdk path --> browse to the . location where you have download and extract your flutter sdk --> select the flutter --> bin

doing every time you open android project

Step1:

open ~/.bash_profile

Step2 paste

PATH="/Users/vrushali/Downloads/flutter/bin:${PATH}"export PATH

This will add the path permanently

Solution 3:

asdf

If you have used asdf to install Flutter SDK.

You can find the location of the flutter by using the following commands,

  1. Open the location of asdf in terminal

    open ~/.asdf
    
  2. Inside the .asdf folder go to installs folder and then to flutter folder. Inside the flutter folder will find the current version of the Flutter SDK as the folder name.

    For example, in my case the folder name is 1.12.13+hotfix.7-stable and the path to the folder is /Users/akarshseggemu/.asdf/installs/flutter/1.12.13+hotfix.7-stable

Solution 4:

For update flutter SDK path in Mac,

1. First your default shell using echo$SHELLcommandin Terminal.
2. Use below commane to open vim editor and update Path.
    - if it is Bash thentype vim $HOME/.bash_profile or vim $HOME/.bashrc 
    - if Z shell thentype vim $HOME/.zshrc
3. Type i to enter INSERT mode (or esc to exit INSERT mode).
4. Type export PATH="$PATH:[YOUR_PATH]/flutter/bin" replacing [YOUR_PATH] with the path to the folder where you moved the flutter folder earlier ex. export PATH="$PATH:/Users/Your_User/Your_Dev_Folder/flutter/bin"
5. Type esc, then :wq! to save and exit.
6. Quit the Terminal and open it again to refresh.
7. Type echo$PATH to check that the path was correctly added.       
8. Type which flutter to verify the flutter command is available.       
9. Type flutter --version to check the Flutter version.

Solution 5:

I asked the people that made the flutter plugin and they helped me out. For making flutter work with your IDE (haven't done this in Android but have in VScodium or Vscode).

In command line: asdf where flutter

In a text document:

export FLUTTER_ROOT="$/asdf/where/flutter/answer/should/go/here"

Add that to your bash_profile above the asdf part. Or your asdf installation won't work. With nano: ctrl+o, enter, ctrl+x.

Give your IDE the path to the installation, it should work. If not, the change needs to take effect, restart your computer.

Post a Comment for "How To Give Flutter Sdk Path In Android Studio On Mac Os"