April 03, 2022
add c:\flutter\bin
into path environment variable.
go to command prompt and run the below command
where flutter dart
download and install android studio
once the installation is done, open the andriod studio.
select standard installation method.
Select accept in the license agreement
android-sdk-license
and click Accept.intel-android-extra-license
and click Accept.android-sdk-preview-license
and click Accept.In the android welcome screen, click More Actions
and select Virtual Device Manager
.
If you don’t get welcome screen in Andriod studio then close the current project File --> Close project
. It will close the project and take you to the welcome screen.
In the Device manager screen click Create device
button.
Select a phone hardware and click Next
.
Here, select phone software (Android OS) by clicking Download
link near the OS version.
Selected image(OS) will be installed.
Once the image(OS) installed you can see the Download
link gone for that name. Which means that image is already downloaded. We can click Next
button now.
There will be play
button in the device manager, use that to open the emulator.
use flutter doctor
command to see everything is installed.
from the above screen we can see there are two items are missing in the installation/configuration.
from flutter doctor
we got cmdline-tools component is missing
. We will install that in this step.
Open android studio. Click SDK manager
icon.
Appearance & Behavior --> System settings --> Andriod SDK
.SDK Tools
tab.Android SDK Command line Tools
.Run flutter doctor
command again to see.
Now the command line tool issue gone. Only the android licnese issue there. We will resove in the next step.
Run below command
flutter doctor --android-licenses
to resolve the android licenses.
Once done run flutter doctor
again.
Now we are ready to create flutter app.
flutter create yourAppName
We have created our app, now we have to open Emulator to run the app.
Open andriod studio. If you don’t see welcome screen then File --> Close project
in android to see the welcome screen.
In the welcome screen, click ⋮
then Virtual Device Manager
.
In the device manager click Play
button to open the Emulator.
use flutter run
command to run the flutter app.
This is just installation and creating first flutter app tutorial. Thtere is a long way to go. Refer below tutorial.