How to give Flutter SDK Path in Android Studio on Mac os
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 :-
Install Android studio
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
Download the Flutter SDK
Extract it where do you want (for example - /Users/vrushali/Downloads/flutter)
- 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,
-
Open the location of asdf in terminal
open ~/.asdf
-
Inside the
.asdf
folder go toinstalls
folder and then toflutter
folder. Inside theflutter
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 $SHELL command in Terminal.
2. Use below commane to open vim editor and update Path.
- if it is Bash then type vim $HOME/.bash_profile or vim $HOME/.bashrc
- if Z shell then type 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.
Vrushali Raut
A strong passion for learning and adapting to new technologies,In this 2.5 year's I have gained a combination of soft-skills and domain knowledge. A real passion for Android application development. • Programming Languages i worked :- Android,Java,Kotlin. Newly started learning Python :) Stackoverflow is the most helpfule site for new learner,fresher. and yes ofcourse first search:) I started solving android challenges by referring stackoverflow question,answer's And Now it's my time to help people who are stuck. I would love to solve the problems and learn by sharing knowledge :)
Updated on July 09, 2022Comments
-
Vrushali Raut almost 2 years
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.
-
Vrushali Raut over 5 yearsYes because since yesterday was solving.. :)
-
onelaview over 3 yearsAlternatively, you can run
asdf which flutter
command in your terminal to get the path to currently active Flutter SDK in your local machine. -
ENG618 about 3 years
asdf which flutter
will actually take you to the flutter executable,asdf where flutter
will take you to the actual location of the configured version of flutter sdk you are using with asdf. So I ended up adding the following to my zsh environment variablesexport FLUTTER_ROOT=$(asdf where flutter)
-
AMS Abu over 2 yearsThanks, I found this really helpful. In order to get it work, I had to navigate to my development directory and entered echo $PATH. I then copied the full path and replaced everything after the colon and before the closing quotation; PATH="$PATH:[here]". Thereafter, I pressed the esc key and typed : followed by wq!. That's what worked for me. THANKS.