Install Flutter without Android Studio on Windows

From Android Studio to VS Code

Whenever I start Android Studio, my PC Paralyse and become enemy of other application. That's why I found the solution of running flutter without installing Android studio, just do the following steps.

Use Windows command prompt for this tutorial

<win-key> + R then type cmd

So we keep everything in a single directory. Choose your 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 latest version of flutter SDK from 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 zip file make a folder inside “C:/Android/ ”folder name as “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 look 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 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. Its very simple to do just search on google “how to turn USB Debugging on ‘phone_name’” or use 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 show a popup click on allow

Create the Emulator

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

I have given name as 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 flutter plugin for visual Studio code code to taste the features of flutter

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

--

--

--

creating world of tomorrow, help others to grow with others

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Displaying Images in Android Studio using Activity Result APIs in Kotlin

Permissions given to app in Manifest file

2D Mobile Game: Idle Player Animation

WhatsApp Plus (WhatsApp+) JiMODs 8.95 Apk Mod Android

WhatsApp Plus (WhatsApp+) JiMODs 8.95 Apk Mod Android

How to make Dark (Night) Mode Theme in Android

Dark (Night) Mode Theme in Android

Flutter Fix

LocalizeApp banking trojan: yet again abusing Accessibility Services

What’s new with Android 12

Mom, my Firebase auth is not working after publishing on Google Play!

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store