Setting up Android Development workbench using Flutter and Android Studio on Ubuntu 16.04 Desktop
This document describes step by step activities involved in installing the android development setup with Flutter on Ubuntu Desktop.
Before we start, let me provide you details about my desktop hardware specs. Its a Dell Latitude 3490, core i5 processor with 8GB RAM and 1TB Disk installed with Ubuntu 16.04
This laptop comes with VT enabled by default,if not please enable by rebooting the system and changing below setting in BIOS
Pre-requisites for Flutter installation:
To install and run Flutter, your development environment must meet these minimum requirements:
- Operating Systems: Linux (64-bit)
- Disk Space: 600 MB (does not include disk space for IDE/tools).
- Tools: Flutter depends on these command-line tools being available in your environment.
bash, curl, file, git, mkdir, rm, unzip, which, xz-utils, zip
Shared libraries: Flutter
test command depends on this library being available in your environment.
libGLU.so.1- provided by mesa packages such as
libglu1-mesaon Ubuntu/Debian and
Once you install these using apt-get (or usually these come be default with Ubuntu 16.04 with continual updates) lets move on to installation of Flutter.
Flutter can be installed using snap usually in U18 or U20 by running below command
sudo snap install flutter --classic
Or we can install manually by the specific version available at https://flutter.dev/docs/get-started/install/linux
- Download the latest or stable version like I have used https://storage.googleapis.com/flutter_infra/releases/stable/linux/flutter_linux_1.17.5-stable.tar.xz
- Copy this to /opt with sudo and extract the same and then change the ownership to the user with which you usually login
sudo tar xf ~/Downloads/flutter_linux_1.17.5-stable.tar.xz
- Now add this path to your enviromental variable either by adding below entry to ~/.bashrc or /etc/profile at the end of the line
- Restart the terminal session in order to verify that flutter command executes. You can optionally pre-download development libraries by running command
- In order to verify all the necessary packages or applications required for flutter exist, you can run below command and anything with Red mark you need to install properly
[-] Android toolchain — develop for Android devices
• Android SDK at /Users/obiwan/Library/Android/sdk
✗ Android SDK is missing command line tools; download from https://goo.gl/XxQghQ
• Try re-installing or updating your Android SDK,
visit https://flutter.dev/setup/#android-setup for detailed instructions.
Installation of Android Studio:
- Download necessary tar ball from https://developer.android.com/studio
- More details on the Android Studio will be available at https://developer.android.com/studio/intro
- Unpack the
.zipfile you downloaded to an appropriate location for your applications, such as within
/usr/local/for your user profile, or
/opt/for shared users. I chose /opt/
If you’re using a 64-bit version of Linux, make sure you first install the required libraries for 64-bit machines.
- To launch Android Studio, open a terminal, navigate to the
android-studio/bin/directory, and execute
- Click on next
- Choose Custom and click Next
- Let the path be default from OS
- UI mode either Dark or Light can be selected here
- Please make sure to select Android Virtual Device ad Android SDK both
Above diagram show the verify the all settings and click the next button.
- Click on Finish. It will take some time to download and install
- Once installed, open the Android studio and for first time it shows Configure
- Click on Configure and it takes to SDK AVD Manager
- This installs the Build Tools, SDK, Emulator and Platform tools
- Now lets setup virtual devices
- Select hardware which type of mobile we use like tablet, TV etc..
- Select the model and other specs
- Click finish to complete
- Now if you click on the run button, you will see the below screen (it will take some time and a kind of fan sound you will hear. Dont be panic, OS is starting a Virtual Device similar to starting a new server)
- If you are running a 64-bit version of Ubuntu, you need to install some 32-bit libraries with the following command:
sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386 lib32z1 libbz2-1.0:i386
- Detailed installation is available on this video: https://developer.android.com/studio/videos/studio-install-linux.mp4
Installing Microsoft Visual Studio Code on Ubuntu 16.04
- Browse to https://code.visualstudio.com/download and select .deb version of Ubuntu to download, as it is easy to install
- Otherwise you can do this from the repo itself as below
- First, update the packages index and install the dependencies by typing:
sudo apt updatesudo apt install software-properties-common apt-transport-https wget
- Next, import the Microsoft GPG key using the following wget command :
wget -q https://packages.microsoft.com/keys/microsoft.asc -O- | sudo apt-key add -
- And enable the Visual Studio Code repository by typing:
sudo add-apt-repository "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main"
- Once the apt repository is enabled , install the latest version of Visual Studio Code with:
sudo apt updatesudo apt install code
Visual Studio Code has now been installed on your Ubuntu desktop and you can start using it.
Starting Visual Studio Code
Now that VS Code is installed on your Ubuntu system you can launch it either from the command line by typing
code or by clicking on the VS Code icon (
Activities -> Visual Studio Code).
When you start VS Code for the first time, a window like the following should appear:
You can now start installing extensions by clicking on the Extensions icon in the Activity Bar on the side of VS Code or the View: Extensions command (Ctrl+Shift+X).
This will show you a list of the most popular VS Code extensions on the VS Code Marketplace.
Each extension in the list includes a brief description, the publisher, the download count, and a five star rating. You can click on the extension item to display the extension’s details page where you can learn more.
Please install Flutter and Dart extension:
Updating Visual Studio Code
When a new version is released you can update the Visual Studio Code package through your desktop standard Software Update tool or by running the following commands in your terminal:
sudo apt updatesudo apt upgrade
In order to confirm that everything required applications and packages are installed, we need to again run the doctor command and make sure that its all Green
(base) mkadmin@mkadmin-Latitude-3490:~$ flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, v1.17.5, on Linux, locale en_IN)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.1)
[✓] Android Studio (version 4.0)
[✓] VS Code (version 1.47.2)
[✓] Connected device (1 available)• No issues found!
How to install glibc-doc ubuntu package on Ubuntu 18.04/Ubuntu 19.04/Ubuntu 16.04
How To Install "glibc-doc" Package on Ubuntu Quick Install Instructions of glibc-doc on Ubuntu Server. It's Super Easy…
Documentation for Visual Studio Code
Find out how to set-up and get the most from Visual Studio Code. Optimized for building and debugging modern web and…
Configure hardware acceleration for the Android Emulator
The Android Emulator can use hardware acceleration features to improve performance, sometimes drastically. This page…
Managing Extensions in Visual Studio Code
The features that Visual Studio Code includes out-of-the-box are just the start. VS Code extensions let you add…
Thanks for reading. Please feel free to comment or provide your feedback.