How to find the path of Flutter SDK
Asked Answered
A

30

200

How to configure Flutter SDK? How to locate the Flutter SDK? I don't know the location of the SDK file.

Image

Altdorfer answered 8/5, 2018 at 14:32 Comment(8)
How did you install Flutter? What operating system?Uncurl
Add "<pathinyourmachine>/flutter/bin" to the Path Environment variable. helpdeskgeek.com/windows-10/…Soliloquize
check thisCoriander
The flutter SDK path is simply the path where you extracted the flutter zip file upto the folder ..../flutter and not flutter/bin ex: in windows: C:\src\flutter and not C:\src\flutter\bin as some have answeredDiastyle
This Flutter Android Studio post might help you. Most of the time you can find it in path variable.Scotch
On mac and linux, if you are able to run flutter on the terminal, you can find your install path using sh -c "readlink -f `which flutter` | rev | cut -d/ -f3- | rev"Away
On windows, with default Flutter plug-in installation from Android Studio, the flutter SDK was in C:\flutter\flutter, and for what it matters the dart SDK was in C:\flutter\flutter\bin\cache\dart-sdkSteve
See this answer https://mcmap.net/q/127363/-how-to-find-the-path-of-flutter-sdkContrail
D
265

If you have the flutter SDK installed.

Run:

flutter doctor -v

The first line will show the install path..

(if you don't have it installed go to the documentation)

Degrade answered 14/8, 2020 at 8:30 Comment(2)
THIS!!! This is the only true correct answer if someone has lost their path in a project. And it does happen. People saying to go look in their IDE are wrong if the project has been made dirty.Expressage
Worked for me too, apparently I have more than one flutter SDK.Humility
P
93

If you've installed flutter from the snap store on Ubuntu, you'll find the SDK at /home/(username)/snap/flutter/common/flutter

FYI - I installed Flutter on Ubuntu 20.04 LTS using snap install and am using Android Studio 4.0.1 installed via JetBrains toolbox app

sudo snap install flutter --classic
sudo snap install flutter-gallery
flutter channel dev
flutter upgrade
flutter config --enable-linux-desktop

It was not necessary to install the SDK separately, the snap steps above will place the SDK at /home/(username)/snap/flutter/common/flutter

Here's the Android Studio Pop-up for a new Flutter app accepting this location for the Flutter SDK:

Flutter SDK Path

Pulque answered 16/7, 2020 at 16:58 Comment(0)
Q
41

In Android Studio

Configuring Flutter SDK is pretty straightforward. You don't have to set paths using the command line if you have already installed Dart and Flutter Plugins in Android Studio

How to Configure Flutter SDK?

Download the SDK and point the SDK folder path in your future projects.

There are different sources you can try

  1. You can clone it from the Github Repository
  2. Download SDK zip file + extract it after downloading
  3. You can also Download any version(including older) from here (For Mac, Windows, Linux)

Use the SDK path in your future projects

enter image description here

How to see Flutter SDK path?

I don't understand the need because you already know the path when you create the project. However, you can get the idea from test/package folder enter image description here

Quadruped answered 18/4, 2019 at 10:18 Comment(6)
How to change the flutter SDK Path after project was createdLentamente
See answer and my comments here: #50236628Vaios
The need comes from for instance im working on a project with a team of devs and someone messed with the .idea folder and messed up everyones local environments. So everyone lost their Flutter SDK paths in Android Studio.Expressage
So did this help? I am just curious. @BryanNeubergerQuadruped
@RohitSingh the best answer is below here just run - flutter doctor -v This will return where your SDK path was downloaded to and is on your local machine.Expressage
@PareshMangukiya thanks your answer is indeed the only answer which addresses changing the flutter sdk path after creatingDaugava
K
29

Download flutter from FLUTTER

or clone from master git clone -b master https://github.com/flutter/flutter.git

So, the flutter sdk path is where you copied or cloned the code till the C:\whateverDrive\flutter inside bin there is a file flutter so when coming to choosing SDK, please select the folder till flutter and add the same in env variable in your windows. remember to add the path till bin that is enough.

configuring the flutter sdk in android studio follow this carefully. This explains everything. ;)

King answered 28/6, 2018 at 19:29 Comment(1)
Don't point till the bin folder. Just point till 'C:\whateverDrive\flutter'Oleic
R
27

You can use where command in cmd

where flutter

enter image description here

Footnote My fiverr Account: https://www.fiverr.com/kamranbashir

Rattlebrain answered 17/8, 2020 at 7:18 Comment(2)
This will help to identify the current location of the flutter sdk in windows operating system from the above answer the sdk path is C:\srcSouthwester
This helped me. Thank you.Inheritable
S
12

If you installed flutter via the snap on linux then the sdk is likely to be in

~/snap/flutter/common/flutter
Superiority answered 26/7, 2020 at 6:5 Comment(1)
I can confirm this is the case in Fedora 32. I needed to add the path to dart, and it was in ~/snap/flutter/common/flutter/bin.Favin
G
11

go to

> File > Settings >Languages& Frameworks > Flutter

and there you can find and change path also

Gilda answered 24/2, 2022 at 13:28 Comment(0)
R
9

The Flutter SDK path is certainly defined in a place where you can check it or change it, whether you created the project or not. Under Settings > Languages & Frameworks there should be a Flutter section. I found it by using the handy search bar in the Settings menu.

At the top of the Languages & Frameworks > Flutter is the Flutter SDK Path.

This is assuming that Flutter/Dart have already been installed under Plugins.

Roundtree answered 10/10, 2019 at 5:24 Comment(2)
Correct. Note that this is a "For current project" setting -- some people think that all Settings are global, but those with a special icon apply to current projectVaios
Also note that just changing this setting did not refresh the ".packages" file for me. I had tun run flutter pub get from terminal to refresh it (and also click File > Sync with File System in Android Studio to load the changes)Vaios
E
7

Assuming you have already installed Flutter Plugin if you have not installed then go to Android Studio IDE setting/preferences(MAC) --> plugin--> Browse Repositories and search Flutter then install and restart IDE

Now follow these steps:-

  1. First of all go to https://flutter.io/get-started/install/ and download the Fluter SDK

  2. Then extract the zip file in any specified folder

  3. Now give this path as Fluter SDK

That's it.

Encyclopedic answered 24/7, 2018 at 7:43 Comment(0)
H
7

pls follow these steps to add path of flutter SDK

Complete installation guide here:

https://androidride.com/how-to-install-flutter-in-android-studio-in-windows/#change_flutter_sdk_path_android_studio

enter image description here

enter image description here

enter image description here

Honorine answered 31/8, 2021 at 7:47 Comment(0)
R
6

Once you have downloaded the Flutter SDK for your specific OS.

Unzip the file. Copy it to a better place. Your Flutter SDK path should be a_better_place/flutter. These would be used in tools such as VSCode or Android Studio.

For command line, you would add a_better_place/flutter/bin. Such as export PATH=a_better_place/flutter/bin:$PATH

Rodrickrodrigez answered 8/5, 2018 at 14:56 Comment(1)
How does this help? Sounds like the OP has already installed the Flutter SDK. And why 4 upvotes??Statistics
H
5

If anyone came here to find it for ubuntu and snap installation default path would be.

/home/[user]/snap/flutter/common/flutter

Housecoat answered 6/3, 2021 at 14:14 Comment(0)
O
4

If you simply moved the folder with flutter binary executable as I did, then I suggest following:

  1. check your echo $PATH to point to the correct folder. Use export PATH="$PATH:$HOME/flutter/bin" or whatever you need (and you can also include this into your ~/.bashrc or ~/.zshrc). Use source ~/.bashrc to update it without exiting the current terminal window
  2. Check your Android Studio (v3.6) Flutter SDK path to point to the right folder
  3. flutter clean will clean the build/ folder with old paths
  4. flutter doctor just to make sure everything is installed in the OS correctly

after that you should be able to flutter run which will build a new app.

Openfaced answered 28/4, 2020 at 15:55 Comment(0)
G
4

In Android Studio (Chipmunk), installing the Flutter plugin only adds the "New Flutter Project" button which when clicked will open this window

But the plugin doesn't install a Flutter SDK. You have to manually download the SDK from https://flutter.dev (use search engine to find the file) then extract the SDK into a folder before specifying the path to this folder into the "Flutter SDK path" window.

Geier answered 29/10, 2022 at 12:44 Comment(0)
P
3

If you are using a windows OS probably this will be your flutter SDK location

C:\src\flutter

If it's not available it's better to choose a path and clone SDK repository

Prothonotary answered 17/12, 2020 at 19:1 Comment(0)
P
2

From Flutter official documentation:

enter image description here

Pulmonate answered 18/7, 2022 at 15:11 Comment(3)
ok so flutter sdk-path is not working for me while flutter doctor works. sdk-path is not a command.Snavely
doesn't work anymoreAway
Well... Flutter need to update their documentation, since they are still displaying this as the correct option to find the SDK :\Pulmonate
R
1

I also had this problem and I solved it inserting my Flutter SDK path which was

C:\...\flutter_windows_v0.6.0-beta\flutter

Recalescence answered 31/8, 2018 at 13:18 Comment(0)
H
1

If you suppose unzipped the flutter zip file in folder called "Flutter". Your Flutter SDK Path will be <path_of_unzipped_file>\Flutter\flutter

Handspike answered 14/12, 2019 at 20:40 Comment(0)
Z
1

as per the official documentation, use

$ which flutter dart

command in your terminal

Zabrze answered 30/12, 2022 at 21:50 Comment(0)
F
0

Visit https://flutter.dev/docs/get-started/install/windows#update-your-path official page of Flutter

for windows you can look an Evroitmen variabel with value name Path

Flagg answered 31/1, 2020 at 5:4 Comment(0)
N
0

All you need to do is to find a folder called "flutter" (lowecase), which is located inside a folder called "Flutter" (uppercase), select it, and browse it.

In my case it is located at:

C:\Users\Administrator\Flutter\flutter_windows_v1.12.13+hotfix.5-stable\flutter

enter image description here

Also make sure that your Flutter and Dart are of the latest version. If they are not, upgrade them and re-start the IDE.

Noto answered 12/7, 2020 at 15:31 Comment(0)
M
0

There are many answers but the only thing that worked for me is to remove > bin from path.

At various places, it is written that the path should be your_path/dart/bin or your_path/flutter/bin but the correct path that you need to enter is the following:

your_path/dart 
your_path/flutter
Misbecome answered 4/9, 2020 at 16:52 Comment(0)
P
0

If flutter SDK is already downloaded in the system, then just add path using the below command. This tested on MAC OS

export PATH='sdkpath':$PATH 

Eg:

export PATH='/Users/apple/dev/flutter/sdk/flutter/bin':$PATH 
Psychoneurosis answered 18/9, 2020 at 10:18 Comment(0)
L
0

Try this command flutter upgrade --force

Levon answered 12/3, 2021 at 16:19 Comment(0)
A
0

I used Android studio , installed plugins for flutter.

When this error came ->

I solved it by downloading flutter sdk from Internet and setting its path by selecting its complete folder as sdk.

Arc answered 21/12, 2021 at 7:6 Comment(0)
B
0
The location to the flutter SDK may be found in the setting.json file.
1) tap ctrl+shift+p
2) tap ctrl+shift+p
3) open setting.json
in that file you maybe found
"dart.flutterSdkPath": "C:\\tools\\flutter_sdk_3.0.4\\flutter\\bin",
"dart.sdkPath": "C:\\tools\\flutter_sdk_3.0.4\\flutter\\bin\\dart",
Bolection answered 10/8, 2022 at 13:16 Comment(0)
H
0

Flutter SDK path as per this documentation is the place where you extracted the flutter folder.

  • In Windows, generally it is C:\src\flutter ---OR--- run where flutter in terminal to get your path
  • In Linux and mac, generally it is ~\development\path-to-your-sdk\bin\flutter ----OR--- run which flutter in terminal to get your path

Note: Provide path of flutter folder

Halla answered 4/7, 2023 at 9:24 Comment(0)
C
0

1- Download flutter SDK from Flutter Dev and after downloading, Unzip it in you desired folder like /Development folder.

2- Then next step is to add flutter command permanently in your path. I was using zsh terminal, so I edited .zshrc file, you will edit your bash profile it may be other one. For zsh

  • nano ~/.zshrc
  • export PATH="/path/to/your/directory:$PATH"
  • Save and exit the editor. For nano, you can typically do this by pressing Ctrl + X, then Y to confirm changes, and Enter to exit.
  • After saving the changes, you can either restart your terminal or run the following command to apply the changes immediately:
  • source ~/.zshrc

Now you can run flutter commands like flutter doctor.

Contrail answered 30/12, 2023 at 4:49 Comment(0)
G
-1

To find the Flutter SDK path [ used Windows10 ]

  1. In your Android Studio home page on the bottom right click on Configure
  2. Then Click on SDK Manager
  3. Then on System Settings
  4. Then on AndroidSDK

You will see the path at the top

Gamopetalous answered 2/12, 2020 at 18:43 Comment(0)
E
-2

How to create FLUTTER project in android studio in fedora:-

I have installed following:- 1 Android studio 2 Then do following:-

Start Android Studio. Open plugin preferences (Preferences > Plugins on macOS, File > Settings > Plugins on Windows & Linux). Select Marketplace, select the Flutter plugin and click Install. Click Yes when prompted to install the Dart plugin. Click Restart when prompted.

4:- Now create project by clicking new flutter project and do following:- * Choose Flutter Application from the list of configurations * Fill the name and other things * For flutter sdk click and install flutter sdk and specify the location of downloading and after downloading completion, choose that sdk path, this will load your FLutter sdk.

Rest do steps as per your need to create project

Eveleen answered 6/3, 2020 at 8:41 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.