How to find the path of Flutter SDK

后端 未结 18 1841
南旧
南旧 2020-12-13 08:17

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

\"Image\

相关标签:
18条回答
  • 2020-12-13 08:38

    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:

    0 讨论(0)
  • 2020-12-13 08:38

    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

    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

    0 讨论(0)
  • 2020-12-13 08:39

    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

    0 讨论(0)
  • 2020-12-13 08:43

    You can use where command in cmd

    where flutter
    

    0 讨论(0)
  • 2020-12-13 08:45

    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.

    0 讨论(0)
  • 2020-12-13 08:47

    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
    

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

    0 讨论(0)
提交回复
热议问题