Setup Flutter Installation in Android Studio - Androhub

  • Home
  • Flutter
  • Setup Flutter Installation in Android Studio
Setup Flutter in Android Studio

Setup Flutter Installation in Android Studio

In this article, we will learn how to setup Flutter installation in Android Studio.

VIDEO TUTORIAL

Install Plugins

First, we have to install the Flutter and Dart plugins in Android Studio.

1. Open Android Studio and navigate to File -> Settings -> Plugins and enter flutter in the input field. It will show suggestions as shown in the below image.

Setup Flutter Installation in Android Studio

2. Now click on the Install button to install the flutter plugin. On click, it will check if you have already installed the Dart plugin or not. If not, then it will prompt you to download the Dart plugin as well as show in below image. Just click on the Install button.

Setup flutter install dart plugin

3. Once the installation is complete it will ask you to Restart IDE. Just click on the Restart IDE button and wait till Android Studio is restarted.

Setup flutter restart IDE

Download Flutter SDK

To configure the Flutter and Dart SDK path in Android Studio we need to download the SDK’s first.

1. To download the Flutter SDK stable version visit the official site. Just go to this link and select your development platform like Windows, Mac, Linux, etc.

2. After selecting the development platform it will ask you to select the type of app like Desktop, Android, or Web. Clicking any type will take you to the next page where when you scroll down there will be an option to download Flutter SDK as shown in the below image.

Setup Flutter download sdk

3. After downloading the SDK, extract the files from Zip.

Move the extracted directory to somewhere safe so that you don’t forget where you have kept the Flutter SDK later.

Configure Flutter and Dart SDK Path

After you have downloaded SDK and moved it to somewhere safe. We have to configure the Flutter and Dart SDK path in Android Studio under Settings.

1. In Android Studio, navigate to Files -> Settings -> Languages & Frameworks. Under Languages & Frameworks, you should see the Flutter and Dart options.

2. Click on the Flutter and paste the extracted Flutter SDK path as shown in the image below. After adding the path click on the Apply button and then the Ok button.

Setup flutter installation in Android Studio - Configure flutter path

Note:

  1. If your Android Studio doesn’t fetch the Flutter version after pasting(refer above image) then you have pasted the wrong path.
  2. Copy the Flutter SDK path till the root directory only.
  3. Flutter and Dart option will only be available after you have installed the plugins as mentioned earlier.

3. After adding the Flutter SDK path, the Dart SDK path will be automatically picked from it. But cross-verify it by clicking on Dart as shown in the image below.

Setup flutter Dart SDK Path

Note: If wrong path or no-path shown under Dart then copy the Dart SDK path from “$extracted_flutter_sdk_path/bin/cache/dart-sdk” (refer above image) and paste it.

Create a New Flutter Project

Now you are all set to create a New Flutter Project.

1. After installing Plugins a new menu option will be added to create a New Flutter Project. Click on it to create a Flutter project.

Create New Flutter Project

2. In the next window, select Flutter and see if the path is correctly mentioned or not. If everything looks good click on the Next button.

Create flutter project path

3. Now in the next window you have to enter your project details and select the platform for which you are creating the project. Once done click on the Create button.

Make sure to keep the project name in small letters otherwise it won’t allow you to create the project. You can use underscores(_) between words.

Flutter project details

4. Once the project is created, your project packages should look like the below image. You can see there are Android, iOS, and web packages depending on the platforms you have selected while creating the project.

Flutter project package details

5. The lib package is the main package for Flutter development. By default, it comes with main.dart which is an entry point for your application.

Flutter project lib package

6. Now you can run your demo project to see if everything is configured or if you missed something. Connect your Android device to run the app.

Flutter run device toolbar

7. If your app ran successfully, you will see the below image on your device.

Flutter run sample screen

 

Points to Note:

  1. To run Flutter commands in PowerShell/Command Prompt/Terminal, you have to update Flutter to your systems PATH.
  2. If you are making an iOS application as well then having Mac with XCode is must to run and release the builds.

Hurray!! We have successfully done the Flutter Installation in Android Studio. Now you are all setup to do Flutter Development using Android Studio.

Thanks 😊

Post comment

Your email address will not be published. Required fields are marked *