How to set up properly Flutter in the android studio on windows
First of all, install java and set the path properly I recommend Download and Install JDK 1.8 on Windows it will work properly in the future in the flutter set up.
Next, Install the latest version of Android Studio, version 3.0.
Install Flutter and Dart plugins install these:
- Start Android Studio.
- Open plugin (Configure > Plugins as of v3.6.3.0 or later).
- Select the Flutter plugin and click Install.
- install the Dart plugin.
- Restart the android studio
after installing the flutter and dart you have to check if the flutter is properly installed or not because in many cases flutter will not work.
Set the flutter Path
- Go to From the desktop, right-click the Computer icon.
- Choose Properties from the context menu.
- Click the Advanced system settings link.
- Click Environment Variables.
- In the New System Variable window, specify the value of the PATH environment variable.
To check the flutter install or you have to go command prompt write the command on the command prompt
flutter --version
or you can use the command on the command prompt
flutter doctor
If it is not working you need to make sure that the flutter/bin
the directory is in your path:
echo $PATH
when all the process is done to run the command again
flutter doctor
when you run this command there is the possibility to arise this type of error
when you use flutter doctor --android-license
it will appear following error
Open your Android Studio, File-> settings->System settings(left tab) ->Android SDK,
go to SDK Tool section
in that page, untick hide obsolete packages, select Android SDL tools(obsolete)
and press apply.
and then set the path in the environment variable.
when all the things are done then run flutter doctor --android-license
if the error has not gone then you have to check the system variable again
where you set the JAVA_HOME path check it that path C:\Program Files\jdk1.8.0_191;
if; at the end then remove the semicolon(;) which is the end of that path
if it appears again then to check the remove it again save it properly.
- Open the cmd
- run
flutter doctor --android-licenses
- press
y
to accept, this process may occur several times. Done!
restart the computer and open the cmd run flutter doctor
command
now you can create your flutter project.