Install Flutter On Windows Step By Step

Install Flutter On Windows Without Installing Android Studio Easy and Simple Way

Install Flutter On Windows Step By Step
(Logo Credit : Android Studio & Flutter.io )

Installing Flutter Is not as difficult as it easy to install and use if your a beginner please follow steps carefully to install flutter on you windows OS. Without Installing Android Studio Follow This Steps :

All the commands in this tutorials are executed using windows command prompt, just run it from start menu, or hit <windows-key> + R then type cmd

 

Creat directory 

To keep everything in single place we will consider the dir C:\Android as main working directory

cd C:\
mkdir Android
cd Android

 

Installing OpenJDK 8

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

extract it and rename the internal folder “jdk8u202-b08” to “openjdk” and copy it under “C:\Android” folder,                               so its path will be: 

 :C:\Android\openjdk

 

Installing Flutter SDK

Download flutter sdk latest version from following url:
https://flutter.io/docs/get-started/install/windows
extract it, and copy the folder with the name “flutter” to C:\Android folder, so the full path will be:

C:\Android\flutter

 

Installing Android command tools

Download Windows version of Android command tools from the following url:
https://developer.android.com/studio/#command-tools
extract it and rename the “tools” folder to “sdk”, then copy it under C:\Android folder, so the full path will be:
C:\Android\sdk

Set Some Environment variables

We need to define some environment variable which let the above tools know how to contact each other, form command prompt run these commands, one by one:

setx JAVA_HOME “C:\Android\openjdk”
setx ANDROID_HOME “C:\Android”
setx ANDROID_SDK_ROOT “C:\Android\sdk”
setx path “%path%;”C:\Android\sdk;C:\Android\sdk\bin;C:\Android\flutter\bin”

 

Download Android SDK

As you may already know the Flutter are based on Android SDK to work , so we need to download system images, platform tools, build tools, platforms, and emulator, by running the following commands:

sdkmanager “system-images;android-27;default;x86_64”
sdkmanager “platform-tools”
sdkmanager “build-tools;27.0.3”
sdkmanager “platforms;android-27”
sdkmanager emulator

 

  • Note1: the date I write this tutorials the latest version of the above images was 28, but I downloaded the previous one, so I can develop app for wider range of Android OS versions, you can run the command sdkmanager --list to see available images and choose whatever you want.
  • Note2: Make sure to accept any license that appear by pressing y then Enter, or nothing will be downloaded.

 

Accept the licenses

Android sdk images have licenses that need to be accepted, you do that with the command:

sdkmanager — -licenses

 

just press y then Enter for for every license.

Configure Flutter

configure flutter to know the dir of Android sdk path

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

Create the Emulator

Create a new emulator with the name “nexus” or choose the name you want:

avdmanager -s create avd -n nexus -k “system-images;android-27;default;x86_64”

 

Run the emulator

flutter emulators --launch nexus

Moment of truth

flutter doctor -v

 

Test flutter code

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

 

If you follow this steps correctly and you succesfully installed Flutter in Your Windows Os The Congralutation Hope you enjoy installing flutter on windows