Flutter Series Overview – Brief
Errors in Flutter Installation
This is the second tutorial of Flutter Crash Course. In this tutorial we will learn how to install flutter in Android Studio. In our first tutorial we cover the overview of our series and you can check it out here. We will install Flutter on Windows using Android Studio IDE step by step as mentioned here. So to install flutter we need pre-requisite and will cover the whole process in 4 main steps.
To install and run Flutter, your development environment must meet these minimum requirements:
- Operating Systems: Windows 7 SP1 or later (64-bit), x86-64 based.
- Disk Space: 1.64 GB (does not include disk space for IDE/tools).
- Tools: Flutter depends on these tools being available in your environment.
- If Git for Windows is already installed, make sure you can run
gitcommands from the command prompt or PowerShell
Watch Youtube tutorial
1. Get the Flutter SDK
- This is the first step in which we have to download the flutter SDK from this link.
- Extract the zip file and place the contained
flutterin the desired installation location for the Flutter SDK (for example,
C:\\drive and paste the unzipped flutter folder inside
Warning: Do not install Flutter in a directory like
C:\\Program Files\\ that requires elevated privileges.
2. Setup Flutter Environment Variables
In this step we will setup env or environment variables on our windows so we can run flutter commands on command prompt or powershell. So, basically there are two environment variables that we have to create Flutter SDK & Android SDK.
- Open environment console by typing env in the search bar in the windows search and open Edit The System Environment variable.
- Setup Path variable by creating new or if already created edit the path variable and set the path of above flutter folder (
- Next setup
JAVA_HOME(Note: If it does not work try ANDROID_HOME instead) variable in the environment same like path but in this variable value add the Android SDK as we did for Flutter SDK (
Run Flutter Doctor
From a console window that has the Flutter directory in the path (see above), run the following command to see if there are any platform dependencies you need to complete the setup:
This command checks your environment and displays a report of the status of your Flutter installation. Check the output carefully for other software you might need to install or further tasks to perform (shown in bold text).
The following sections describe how to perform these tasks and finish the setup process. Once you have installed any missing dependencies, you can run the
flutter doctor command again to verify that you’ve set everything up correctly.
3. Install Flutter and Dart Plugins
In this step we will setup / install our IDE Android studio and install flutter and dart plugins in it. As I’ve already create a detail tutorial on how to install android studio which you can check here.
Next to install Flutter and Dart plugins open IDE and from the left menu click on plugins. In the search bar search for flutter and hit install. Make sure you have an active internet connection. Flutter will auto popup a modal and ask your to install dart as well. So accept it and restart the IDE when download completed.
Tip: To check weather flutter and dart are in same folder run the command in the command prompt
C:\\Users\\taimo>where flutter dart
Flutter Crash Course Series
Check the whole series of flutter crash course. This series is available on both YouTube & on blog posts.
4. Agree to Flutter Licenses in the command prompt
Before you can use Flutter, you must agree to the licenses of the Android SDK platform. This step should be done after you have installed the tools listed above.
- Make sure that you have a version of Java 8 installed and that your
JAVA_HOMEenvironment variable is set to the JDK’s folder.
JAVA_HOMEis not working then try
- Android Studio versions 2.2 and higher come with a JDK, so this should already be done.
- Open an elevated console window and run the following command to begin signing licenses.
flutter doctor --android-licenses