DEV Community

Cover image for Install Flutter without Android Studio
Enger Jimenez
Enger Jimenez

Posted on

Install Flutter without Android Studio

In this tutorial, we will install Flutter and configure it, without installing Android Studio or any device emulator.

Alt Text

Prerequisites

  • Terminal.
  • Git.
  • Access to system environment.
  • VS Code and Flutter extension.

Steps

  1. First let's create a folder called src or something you want in our C drive.

  2. Now let's go to install the Flutter SDK. We proceed to enter to the C:\src folder and run
    git clone https://github.com/flutter/flutter.git
    the Flutter sdk starts to download.

  3. When the Flutter sdk has been downloaded, type "env" in the Windows search (or press windows key), and click on "Environment Variables...", edit the Path of the User Variables and add a new one "C:\src\flutter\bin".
    Alt Text
    Alt Text

  4. Run the command flutter, if the command is found it will start downloading some dependencies, after that run flutter doctor.

  5. Download OpenJDK8, I recommend using this one http://download.java.net/openjdk/jdk8u40/ri/openjdk-8u40-src-b25-10_feb_2015.zip
    Just extract the files on a folder like "C:\Program Files\Java\openjdk8".

  6. Add the JAVA_HOME and the path to the System Variables, go to edit the Environment Variables and click on "New..." under the System Variables
    Alt Text
    After you add the new system variable you can set the path for java, edit the Path of the System Environment and add "_%JAVA_HOME%\bin"
    Alt Text

  7. Download Android SDK, Head to https://developer.android.com/studio#downloads and download Command line tools only for Windows. After downloaded, just extract the folder (tools) in a new folder on "C:\Android".

  8. Install Android dependencies. Move to "C:\Android\tools\bin" and run the sdkmanager.bat --list (with the Terminal), run the following commands:
    sdkmanager.bat “platform-tools”
    sdkmanager.bat “build-tools;28.0.3”
    sdkmanager.bat “platforms;android-28”
    sdkmanager.bat "platform-tools"

  9. Add the ANDROID_HOME to the System Variables, add a new entry called "ANDROID_HOME" and the value is the path of your installation
    Alt Text

  10. Allow debugging mode on your phone, you can follow this tutorial https://developer.android.com/studio/debug/dev-options, allow the connection from your PC prompted on your phone's screen.

  11. Run flutter doctor.

Top comments (7)

Collapse
 
edgarmc100 profile image
EdgarMC100

Thank you Enger, If someone has a problem with the sdk, use this sdk version dl.google.com/android/repository/s...

Collapse
 
alhiane profile image
Alhiane Lahcen

i gott erorr

ERROR: JAVA_HOME is set to an invalid directory: C:\Program Files\Java\openjdk

Please set the JAVA_HOME variable in your environment to match the
location of your Java installation.

Collapse
 
roopaish profile image
Rupesh Budhathoki

github.com/AdoptOpenJDK/openjdk8-b...
I know its late but this openjdk works. The one mentioned in this article doesn't even have bin folder as of now.

Collapse
 
unlucky profile image
UnLucky
Collapse
 
fatokitemi01 profile image
Fatokitemi01

sorry, can i ask? I am using a system 4gb of RAM, Corei3 and 500GB can i run flutter on the system, also i want to ask can i use visual studio code as the IDE and my Phone as the emulator

Collapse
 
unlucky profile image
UnLucky

you can
but you need some patience while you begin

Collapse
 
edo90 profile image
Edward Colón

Excellent post Enger

Some comments may only be visible to logged-in visitors. Sign in to view all comments.