Install Flutter on Ubuntu 20.04 LTS (Focal Fossa)
Installation guide to build Android and iOS app in a day!
Install Flutter on Ubuntu 20.04 LTS (Focal Fossa)
Ubuntu 20.04 LTS has just been released.
We need to revise the installation procedure to design, build, deploy and maintain Flutter applications.
It takes 2 to 3 hours to make it happen, including the download of the files.
Contact me if you have any question @abdelkrim
Install Flutter
download the software on https://flutter.dev/docs/get-started/install/linux
mkdir ~/app
cd ~/app
tar xf ~/Downloads/flutter_linux_v1.12.13+hotfix.9-stable.tar.xz
Add the path of flutter into the PATH echo 'export PATH=$PATH:~/app/flutter/bin' >> ~/.bashrc
Run flutter config --no-analytics if you don't want to send analytics to Google
Run flutter precache to install the dev tools locally
Run flutter doctor to check if the installation is complete
abdelkrim@:~$ flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, v1.12.13+hotfix.9, on Linux, locale en_US.UTF-8)
[✗] Android toolchain - develop for Android devices
✗ Unable to locate Android SDK.
Install Android Studio from:
https://developer.android.com/studio/index.html
On first launch it will assist you in installing the Android SDK
components.
(or visit https://flutter.dev/setup/#android-setup for detailed
instructions).
If the Android SDK has been installed to a custom location, set
ANDROID_HOME to that location.
You may also want to add it to your PATH environment variable.
[!] Android Studio (not installed)
[!] VS Code (version 1.44.2)
✗ Flutter extension not installed; install from
https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter
[!] Connected device
! No devices available
! Doctor found issues in 4 categories.
Install Android Studio
install Android Studio [https://developer.android.com/studio/index.html](https://developer.android.com/studio/index.html)
Download the files : android-studio-ide-192.6392135-linux.tar.gz
tar xf ~/Downloads/android-studio-ide-192.6392135-linux.tar.gz ~/app
echo 'export PATH=$PATH:~/app/android-studio/bin' >> ~/.bashrc
source ~/.bashrc
Run Android Studio studio.sh

Install Android Studio

Install (Obsolete) Android SDK Tools (uncheck the ‘hide obsolete packages’)
Install the Linux-based systems support VM acceleration through the KVM software package
Follow the instructions for Ubuntu : https://help.ubuntu.com/community/KVM/Installation
Install the KVM software if the instruction displays a number greater than 0 egrep -c '(vmx|svm)' /proc/cpuinfo
egrep -c '(vmx|svm)' /proc/cpuinfo
**4**
Install the KVM software if the instruction displays that the KVM acceleration can be used if you booted into XEN Kernel cat /sys/hypervisor/properties/capabilities or kvm-ok
INFO: /dev/kvm exists
KVM acceleration can be used
egrep -c ' lm ' /proc/cpuinfo
egrep -c ' lm ' /proc/cpuinfo
4
uname -m
$ uname -m
x86_64
Install KVM sudo apt-get install qemu-kvm libvirt-clients libvirt-daemon-system bridge-utils virt-manager
Google indicates that you should install those packages but it did not work on my computer sudo apt-get install qemu-kvm libvirt-bin ubuntu-vm-builder bridge-utils ia32-libs-multiarch
reading package lists... Done
Building dependency tree
Reading state information... Done
Package libvirt-bin is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'libvirt-bin' has no installation candidate
E: Unable to locate package ubuntu-vm-builder
E: Unable to locate package ia32-libs-multiarch
- libvirt-bin provides libvirtd which you need to administer qemu and kvm instances using libvirt
- qemu-kvm (kvm in Karmic and earlier) is the backend
- ubuntu-vm-builder powerful command line tool for building virtual machines
- bridge-utils provides a bridge from your network to the virtual machines
Configure the network bridge
run ip a
run sudo nano /etc/network/interfaces
Add the following lines and save the file
auto br0
iface enp0s3 inet manual
iface br0 inet dhcp
bridge_ports enp0s3
Add your user to the group
run whoami and look at your username or echo $LOGNAME
run sudo $LOGNAME user1 libvirt run sudo $LOGNAME user1 libvirt-qemu run sudo $LOGNAME user1 kvm
Verify the installation and run virsh list --all; the result should be empty
Id Name State
----------------------------------
Run ls -l /dev/kvm and check that the users are root and kvm and not root and root
crw-rw----+ 1 root kvm 10, 232 mai 1 11:37 /dev/kvm
Accept the licences
Run flutter doctor --android-licenses
Install the flutter plugin on Android studio
run studio.sh
open Configure > Plugins
Search for Flutter and install the plugin Flutter by flutter.dev
Search for Dart and install the plugin Dart by JetBrains

Install the flutter plugin on Android studio
Install the Flutter extension for VSCode
open VSCode
press F1 and type ext install Dart-Code.flutter (hint: remote the character >)
See the description of the extension: open https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter
Setup the Android device
run sudo apt-get install adb
Set up the Android emulator
See https://flutter.dev/docs/get-started/install/linux#set-up-the-android-emulator
- Launch Android Studio > Tools > Android > AVD Manager and select Create Virtual Device. (The Android submenu is only present when inside an Android project.)
- Choose a device definition and select Next.
- Select one or more system images for the Android versions you want to emulate, and select Next. An x86 or x86_64 image is recommended.
- Under Emulated Performance, select Hardware — GLES 2.0 to enable hardware acceleration.
- Verify the AVD configuration is correct, and select Finish.
- In Android Virtual Device Manager, click Run in the toolbar. The emulator starts up and displays the default canvas for your selected OS version and device.

Set up the Android emulator
Check the installation
run flutter doctor
$ flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, v1.12.13+hotfix.9, on Linux, locale en_US.UTF-8)
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
[✓] Android Studio (version 3.6)
[✓] VS Code (version 1.44.2)
[!] Connected device
! Doctor found issues in 1 category.
Check your phone due to the Connected device issue and authorize your computer to access the computer!
run flutter doctor and you should be ready!
[!] Connected device
• Device 92813c9 is not authorized.
You might need to check your device for an authorization dialog.
That’s all folks!
메타데이터
- post_id
- 65ca0f86e02e
- slug
- install-flutter-on-ubuntu-20-04-lts-focal-fossa-65ca0f86e02e
- url
- https://medium.com/@Abdelkrim/install-flutter-on-ubuntu-20-04-lts-focal-fossa-65ca0f86e02e
- canonical_url
- https://medium.com/@Abdelkrim/install-flutter-on-ubuntu-20-04-lts-focal-fossa-65ca0f86e02e
- author_url
- https://medium.com/@Abdelkrim
- status
- ok
- fetched_at
- 2026-07-29 03:06:21