I am new in android studio and flutter and I have encountered several problems after installing them. I already went to flutter doctor and it’s all checked so flutter isn’t the problem. I can’t start coding because of these problems:
Here the sample code made by flutter itself I can’t run it has several errors and
Here I can’t run any virtual device because it says that I don’t have an internet connection which is not true. I cannot code if I can’t run the sample dummy code.
Thanks
4
Answers
Try to reinstall android studio with stable internet connection.
i would advise you to follow below steps to download system images to create virtual device
I think you haven’t properly done the setup for Android Studio. Please check the documentation where you will get steps for proper installation.
Few things which you can check:
Some errors i got and how i fixed it
(ERROR 1)
[flutter] flutter doctor -v 'crumb'
is not recognized as an internal or external command, operable program or batch file. Error: Unable to find git in your PATH. exit code 1(FIX) Go to flutter installation folder and inside flutter/bin edit the flutter.bat file using a text editor and remove the line (20) that says
IF EXIST "%mingit_path%" SET PATH=%PATH%;%mingit_path%
The code should look like this on those lines
REM If available, add location of bundled mingit to PATH
SET mingit_path=%FLUTTER_ROOT%binmingitcmd
Save and Run flutter doctor and everything should work fine.
(ERROR 2) flutter doctor takes too long
(fix) I downloaded the previous version of the sdk it worked like a charm
(ERROR 3) Android sdkmanager not found. Update to the latest Android SDK and ensure that the cmdline-tools are installed to resolve this.
(fix) Open Android Studio
Tools Menu, SDK Manager
In the window that comes up there are inner panels, choose SDK Tools panel
Tick Android SDK Command-line Tools
Choose Apply button near the bottom of the window
This worked
(ERROR 4) `The term ‘flutter’ is not recognized as the name of a cmdlet, function, script file, or operable program.
(fix) put the correct part in the env variables like i had put
D:flutter
insted ofD:flutterbin
that worked