Here's How We Can Install And Configure Flutter SDK With Android Studio


How To Install Flutter sdk ,flutter for web, flutter for android


In this article let's check out how we can download and install Flutter SDK with Android Studio on Windows 10.

What Is Flutter?

Flutter is an open-source UI software development kit created by Google. It is used to develop applications for Android, iOS, Windows, Mac, Linux, Google Fuchsia and the web. 


Steps To Install:

Configure Flutter On System

>>  Download the .zip file of the Flutter SDK.

>> Extract the .zip file in C disk."C:/flutter"

>> Now search "Edit the system environment variables" on Windows search bar.

>> Click on "Environment Variables". 

>> In "System variables" select the "Path" variable and then click on Edit.

>> Click on New and paste the path of bin folder of Flutter: "C:\flutter\bin"

>> Now click on "OK" for all the windows to get saved.


Android Studio

>> Download Android Studio.

>> Run the installer and install the Android Studio.
 
>> After clicking "Finish".Now select "Do not import settings" and click on "OK".

>> It will open "Android Studio Setup Wizard".
Click on Next. 

>> Select "Custom" and again click on "Next". 

>> Select the "theme editor" and click on "Next". 

>> Now download the Android SDK, to do this check all the checkboxes. 

>> Click on the button that has 3 points “…”.The file browser will open.

>> Select the folder of "your windows username", inside create a folder called Android and inside this, a folder called SDK, and then select the folder SDK and click on OK. (C:\Users\<YOUR_WINDOWS_USERNAME>\Android\SDK)

>> Now finish the setup after that Android Studio would open automatically.


Flutter Plugin On Android Studio:

>> Open the "Environment variables". 

>> And in the "System variables" click on "New". 
In Variable name type "ANDROID_HOME"

>> Click on "Browse directory" and select the path to download the Android SDK: "C:\Users\<YOUR_WINDOWS_USERNAME>\Android\SDK "

>> Now click on "Ok" in the 3 windows to save changes.

>> Open "Command Prompt". Type the command "flutter doctor" and press "Enter".

>> You will notice that you need to accept Android licenses, so type the following command and press Enter: "flutter doctor --android-licenses"
 
>> Now you will be asked if "you agree each licence", in which you must type "Y" and press Enter for each license.

>> When you have accepted all the licenses you will get All SDK package licenses accepted and close the Command Prompt.



Flutter Project On Android Studio:

>> In the "Welcome To Android Studio" window click on  "Start a new Flutter project". 

>> Select Flutter Application and click on Next, it will open Configure the new Flutter application.
 
>> In Project name enter the name of the project, which should go in the lowercase_with_underscores. 

>> In Flutter SDK path enter "c:\flutter".
 
>> In Project location enter the location where you want to create the project.

>> In Description enter a brief description of the project.

>> Now click on Next, and it will open Set the package name. 

>> In Company’s domain enter a domain of yours or any unique identifier you want, which will be used to generate the Package name.
  
>> The Package name will be auto-generated with the Project name and the Company’s domain, which is used to identify your app in the Play Store, although if you do not like it auto-genre you can edit it.

>> In Platform channel language choose if you want your app Flutter support Kotlin for the Android code and Swift for the iOS code, in case you want to also code native code for each platform.

>> Click on Finish and it will create all the folders and files of your project Flutter.

 

Android Emulator:

>> In Android Studio, click on "Tools > AVD Manager". 
 
>> Now click on "Create Virtual Device". 

>> Select a Nexus 5 and click on Next. 

>> Select the system image that you downloaded with your Android SDK**, i**n my case it was Pie – 28 – x86 – Android 9.0, and then click on Next. 

>> Click on Finish. 

>> Now click on the button Run to "run the Android Emulator" and closes the window.

 >> To run flutter app, first we need to get into "main.dart" file and we need to click on "Run".

Thank you for going through this article, hope it's worth your time.