Favourite List
Nothing Added.

Install Flutter on Linux without Android Studio


Install Flutter Linux

Flutter is a mobile app SDK for building high-quality native interfaces on iOS and Android. If you are a developer and also a Linux lover then you can use flutter on your system as well. Here we will show you how to install flutter on Linux.

This guide is tested on Ubuntu 22.04 LTS , PopOS, Fedora 36 Workstation , Cutefish OS using Flutter 3.0.5 stable version. 
What will you get after reading this article.
  1. Able to install flutter on any linux based distro.
  2. Install flutter without android studio.
  3. Install android sdk toolchain and also for linux.

How to Setup Flutter on Linux

This Guide will walk you through to the installation of Flutter to your Linux Machine. We are not installing Android Studio, we will set flutter up to Visual Studio Code. Basically we need - Flutter , Java JDK , Andoid SDK Toolchain. So let's install.

Download Flutter 3.0.5

Let's download the latest version of Flutter.Hit on Flutter Official Page and download the stable version of Flutter. Currently flutter 3.0.5 stable release on going.


Download Android SDK tools

The SDK command line tool is a great tool for creating new Flutter projects quickly and easily. You can use it to create standalone web apps, native applications for Android and iOS, or even server-side applications using Flutter's Dart code generation technology.

Android SDK  contains commadline tools, platform tools, build tools etc. We have to download them. Don't worry , Orkitt created a zip file with all of those tools. Simply download this file.


Install JDK 17 

Our all resources downloaded successfully. So first we will install Java Developement Kit (JDK) 17. For that, install synaptic package manager. It will help us to install JDK 17. 
sudo apt install synaptic


Step:1

Now open Synaptic and search Open JDK 17 

INstall Open JDK

Mark it and click on Apply Button. It will install JDK 17 and Set Java Home for you. Our first step is complete.

Extract Flutter and SDK

Resources


1. We have already downloaded our 2 resources file. Now on your User Home Directory create a new folder and name it Android. It will be set as Android Home later.

2. Go to Download Folder and Extract flutter_linux_3.0.5-stable.tar file to Android Folder.

Extract Flutter

3. Again Extract Sdk.zip to Android Directory. So our Android Folder will look Like this.

Androd Home Folder

Set Path for Flutter and SDK

Now Our Final Step, Let's set path to use Flutter and SDK globally. On user home directory , show hidden files from setting and find the bash.rc file and open it on a text editor.

flutter edit path value



At the end of the file paste this code and save it.

#Path provided with Orkitt  Stracture
export PATH="$PATH:$HOME/Android/flutter/bin"
export ANDROID_HOME="$HOME/Android/Sdk"
export ANDROID_TOOLS="$HOME/Android/android-sdk/cmdline-tools/latest"
export ANDROID_PLATFORM_TOOLS="$HOME/Android/android-sdk/platform-tools"
PATH=$PATH:$ANDROID_HOME:$ANDROID_TOOLS:$ANDROID_PLATFORM_TOOLS:

All set, Now restart your Computer. We will verify our installation .

Verify Flutter Installation

Before verifying our setup, we need to install Visual Studio Code. Download VS Code from here and Install it. To verify our installation run this command.
flutter doctor


Flutter Doctor Errors



We have successfully installed Flutter, Android Sdk tool chain without Android Studio. Now You can develop android app using Flutter on your Linux. We don't install linux toolkit here, that's why this red warning. Don't worry it's not a problem. It's for missing Linux toolchain. Let's install additional softwares and linux tool chain.

Linux Toolchain Setup

Now let's fix those errors and install adb for debugging through usb connected device.
sudo apt-get install adb clang cmake ninja-build libgtk-3-dev git -y

Everything looks Perfect , Download VScode and install flutter extension. You can see this article about The Best VS Code Extension for Flutter Dveloper.

Flutter Doctor



Happy Coding.

Watch On YouTube


Conclusion

Flutter provides a powerful and expressive development environment that makes it easy to develop sophisticated applications. Flutter has full support for native platform toolchains and can also run on top of a range of third-party cross-platform toolchains. In the next article we will install linux tool chain to develop native Linux app. If you are facing any issue , please leave us a comment , we will help you.

Next Post Previous Post
Feels like
No Comment
Add Comment
comment url