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
CodePudding user response:
Try to reinstall android studio with stable internet connection.
CodePudding user response:
i would advise you to follow below steps to download system images to create virtual device
- Select sdk manager
- Download a system image by selecting show package details.You can download api32 system images which is the latest for now.
- Once downloaded you can see the image file while created avd.
CodePudding user response:
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:
- Flutter and Dart plugins should be installed in Android Studio
- If you want to run on an emulator, you will have to download the image for it whose answer you can find in previous answers.
- When you first open Android Studio, you should get an option to create a Flutter Application.
CodePudding user response:
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%\bin\mingit\cmd
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 of D:\flutter\bin
that worked