This is a guide for setting up Flutter into GNU/Linux.
Download
Create a folder to keep the source code of Futter and Android Studio
mkdir ~/.development cd .development
Clone Flutter Source Code.
git clone https://github.com/flutter/flutter.git -b stable
Download and extract Android Studio from here into this folder.
- It can be downloaded from FlatHub:
flatpak install flathub com.google.AndroidStudio
Add the flutter tool to your path
export PATH="$PATH:/home/<username>/.development/flutter/bin"
and then restart your shell or terminal.
Configuration
Download Dart SDK via
flutter precache
Open Android Studio and download essential tools required for Android SDK
Add Android SDK Path into Flutter
flutter config --android-sdk /home/<username>/Android/Sdk
you can find the SDK location in the
SDK Manager
settings inside Android Studio.Remove Flutter Analytics and Web support.
flutter config --no-analytics --no-enable-web
Accept android licenses via
flutter config --android-licenses
Error Test
Now to check configurations run flutter doctor
The output will be something like this
Taking about the warning (& errors, if any)
- Android Studio (not installed): You can specify the Andoird Studio Directory if you by simple typing (optional)
flutter config --android-studio-dir <path of android studio>
- [!] Connected device ! No devices available : This is showing because you don't have an emulator running. Which is completely normal.