Install Flutter without Android Studio on Windows

Karan Singh
4 min readAug 15, 2020
From Android Studio to VS Code

Whenever I start Android Studio, my PC becomes paralyzed and interferes with other applications. That’s why I have found a solution to run Flutter without installing Android Studio. Just follow these steps:

Reminder: Guys, this article is old. Maybe I have mentioned some packages that are outdated, but the process will remain the same with the latest packages. Please install the updated packages accordingly

Use the Windows command prompt for this tutorial

<win-key> + R then type cmd

So we keep everything in a single directory. Choose the directory where you want to install Flutter. I am choosing my C drive. you can also do as I am doing.

Create Directory

cd C:\
mkdir Android
cd Android

Install Git

First, we need to install git in our system.

download git for Windows from the following URL

Install Flutter SDK

Download the latest version of Flutter SDK from the below URL:

extract the zip file and copy the folder with the name “flutter” to C:\Android” folder, the full path look like this

c:\Android\flutter 

Install OpenJDK 8

Download binaries for Windows from the following URL: https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u202-b08/OpenJDK8U-jdk_x64_windows_hotspot_8u202b08.zip

extract the zip file and copy the folder with the name “openjdk” to “C:\Android” folder, the full path look like this

C:\Android\openjdk

Install Android command tools

Download Android command tools for Windows from the following URL: https://developer.android.com/studio/#command-tools

before extracting the zip file make a folder inside “C:/Android/ ”folder name “cmdline-tools” to the directory look like this

C:\Android\cmdline-tools

extract the zip file and copy the “tools ” folder inside “C:\Android\cmdline-tools” so the full path looks like this

C:\Android\cmdline-tools\tools

Set Some Environment Variables

setx JAVA_HOME “C:\Android\openjdk”
setx ANDROID_HOME “C:\Android”
setx path “%path%;”C:\Android\cmdline-tools;C:\Android\cmdline-tools\tools;C:\Android\cmdline-tools\tools\bin;C:\Android\flutter\bin”

Download Android SDK

So for Flutter to run we need to install Android SDK

sdkmanager “system-images;android-28;default;x86_64”
sdkmanager “platform-tools”
sdkmanager "build-tools;28.0.3"
sdkmanager "platforms;android-28"
sdkmanager emulator

right now the latest version is 30 you can download that one also , I am downloading the version 28 to make app for wide range of Android OS version. by running the command sdkmanager --list to see available images to install for your android

You can download any version after that flutter will automaitcally install the version compatible with your Android

After that make sure you accept any license that appear on cmd by pressing y

Accept the licenses

for accepting the licenses run the following command

sdkmanager --licenses

press y then Enter for each license

Configure SDK path for Flutter

flutter config --android-sdk C:\Android\

Setup Your Android Phone

For running Flutter App on our physical device we need to turn on USB Debugging on your Android phone. It's very simple to do just search on Google “how to turn USB Debugging on ‘phone_name’” or use the below link as a reference

Call To Flutter Doctor

Run this command

flutter doctor -v

This command give you all green tick, ignore [!] at android studio because we are not using it.

if it ask for Accept Licenses with flutter doctor use below command to accept licenses

flutter doctor --android-licenses

Run Flutter App

cd C:\Android\flutter\examples\first
flutter run

your phone shows a popup click on allow

Create the Emulator

If you don’t have access to a physical device you can use an emulator. Use the below command to create an emulator

I have given a name Pixel you can give any name you want

avdmanager -s create avd -n Pixel -k “system-images;android-28;default;x86_64”

answer [no] to the showed question.

Run the emulator

flutter emulators --launch Pixel

List of already created virtual emulators

avdmanager list avd

Flutter run

Then again test your flutter code, before that make sure no physical Android device is connected to your pc

cd C:\Android\flutter\examples\first
flutter run

Delete the emulator

avdmanager delete avd -n Pixel

Now you can code inside Visual Studio Code just install the Flutter plugin for Visual Studio code to taste the features of Flutter

I personally prefer to run an Android app on the physical device if your pc has low specs or if you need to build an app fast because in an emulator your pc will consume so much ram while running an emulator

--

--

Karan Singh

creating world of tomorrow, help others to grow with others