DEV Community

Brylie Christopher Oxley
Brylie Christopher Oxley

Posted on

Install Flutter on Ubuntu 21.10 with Snap and APT

Follow these steps to install Flutter, Java (OpenJDK), Android Studio, Chromium, and Visual Studio Code on Ubuntu 21.10.

We use Snap and APT to make it easy to keep these packages up-to-date.

Flutter

Install the official Flutter Snap package with classic permissions.

sudo snap install flutter --classic
Enter fullscreen mode Exit fullscreen mode

Java SDK (OpenJRE)

As of this writing, OpenJDK 11 is the default JDK on Ubuntu 21.10.

sudo apt install default-jdk
Enter fullscreen mode Exit fullscreen mode

Android Studio

Install Android Studio via Snap with classic permissions.

sudo snap install android-studio --classic
Enter fullscreen mode Exit fullscreen mode

Chromium

Install the Chromium browser via Snap.

sudo snap install chromium
Enter fullscreen mode Exit fullscreen mode

CHROME_EXECUTABLE

Next, set the CHROME_EXECUTABLE to the Chromium installation path.

Assuming your default shell is bash, add the following to .profile or .bash_profile if it exists.

Note: you may need to log out and back in after running the following command.

echo "export CHROME_EXECUTABLE=/snap/bin/chromium" >> ~/.profile
Enter fullscreen mode Exit fullscreen mode

Visual Studio Code

Install the Visual Studio Code IDE via Snap.

sudo snap install code --classic
Enter fullscreen mode Exit fullscreen mode

Flutter extension

Open Visual Studio Code and install the Flutter extension.

Flutter Doctor

Finally, verify that everything was installed correctly by running Flutter Doctor.

flutter doctor
Enter fullscreen mode Exit fullscreen mode

Conclusion

In this quick overview, we have installed a full Flutter development environment in Ubuntu 21.10.

I hope you enjoy seeing your ideas take flight with Flutter :-)

Top comments (0)