Installation Process of Flutter - flutter

C:\Users\aakas>flutter doctor
'Information' is not recognized as an internal or external command,
operable program or batch file.
'Information' is not recognized as an internal or external command,
operable program or batch file.
Error: Unable to find git in your PATH.
[1]How to fix it, I already set the environment variable and dart is working but flutter is not working

Have you updated your Flutter path in your Environment variables?
update your path in environment variables and restart your system and run again flutter doctor in Command Terminal.

To run Flutter on your device properly you have to install these following things first:
Android Studio
Chrome (Browser)
Git
IntelliJ (Not sure if it's a must or not but flutter doctor does check for it)
Otherwise, you'll face difficulties for not installing any of them.
The following is the result I got after running flutter doctor on my device and it shows the things it checks for Flutter to be properly running.
[√] Flutter (Channel stable, 2.6.0-11.0.pre, on Microsoft Windows [Version 10.0.19043.1288], locale en-US)
[√] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
[√] Chrome - develop for the web
[√] Android Studio (version 2020.3)
[√] IntelliJ IDEA Community Edition (version 2021.2)
[√] VS Code (version 1.62.1)
[√] Connected device (2 available)

Related

my new flutter app created is not working on my android device version 8

I just created a new flutter project with no dependencies added and I'm getting this errors
`* What went wrong:
A problem occurred evaluating project ':app'.
Could not initialize class com.android.build.gradle.internal.crash.PluginCrashReporter`
`
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 3.3.8, on Microsoft Windows [Version 10.0.19043.2251], locale en-US)
Checking Android licenses is taking an unexpectedly long time...[!] Android toolchain - develop for Android devices (Android SDK versio
n 32.0.0)
! Some Android licenses not accepted. To resolve this, run: flutter doctor --android-licenses
[√] Chrome - develop for the web
[X] Visual Studio - develop for Windows
X Visual Studio not installed; this is necessary for Windows development.
Download at https://visualstudio.microsoft.com/downloads/.
Please install the "Desktop development with C++" workload, including all of its default components
[√] Android Studio (version 2021.1)
[√] VS Code (version 1.73.1)
[√] Connected device (4 available)
[√] HTTP Host Availability
`
...and as you can see from my flutter doctor, everything looks fine and okay. Can someone please help me on this because I actually can't figure it out. Thank You.
I have tried upgrading the gradle but I'm still not getting a good result
Try to deleted .gradle caches by typing this in terminal rm -rf $HOME/.gradle/caches/ if error still exist proceed to step 2
Try the command with --scan,it could be ~/.android was owned by root, so your build (launch by my user) failed to read/write into this directory.
Solution: sudo chown -R you:you ~/.android
Accept Your Android licenses usinge this command
flutter doctor --android-licenses
After that accept all

Flutter runs only from C:\Windows\system32> folder

I have just installed flutter 3 on my Windows machine. However, it gives out the following error when running any flutter command.
'where' is not recognized as an internal or external command, operable program or batch file. Error: Unable to find git in your PATH.
However, when I run flutter doctor in the C:\Windows\system32 folder, whether using administrative privileges, I get the following output:
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 3.3.1, on Microsoft Windows [Version 10.0.19044.1889], locale en-US)
[√] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
[√] Chrome - develop for the web
[√] Visual Studio - develop for Windows (Visual Studio Professional 2022 17.3.3)
[√] Android Studio (version 2021.2)
[√] VS Code (version 1.71.0)
[√] Connected device (3 available)
[√] HTTP Host Availability
• No issues found!
Flutter projects also do not open in Android Studio.
Somebody, please help.
Please help me with how I can run flutter.
add to your PATH c:\windows\system32
I had the same problem and that's how I solved it

i have a problem with flutter : 'where' is not recognized as an internal or external command

i'm facing a problem with my flutter, when i write in my command 'flutter doctor' i get :
where' is not recognized as an internal or external command,
operable program or batch file.
Error: Unable to find git in your PATH.
Then when i run the command as administrator, and wrote 'flutter doctor' :
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 2.2.1, on Microsoft Windows [Version 10.0.18362.1256], locale en-US)
[√] Android toolchain - develop for Android devices (Android SDK version 30.0.0-rc4)
[√] Chrome - develop for the web
[√] Android Studio (version 4.1.0)
[√] IntelliJ IDEA Community Edition (version 2020.3)
[√] VS Code (version 1.56.2)
[☠] Connected device (the doctor check crashed)
X Due to an error, the doctor check did not complete. If the error message below is not helpful, please let us know
about this issue at https://github.com/flutter/flutter/issues.
X ProcessException: Failed to find "reg" in the search path.
Command: reg
! Doctor found issues in 1 category.
and in android studio i get:
Error: PowerShell executable not found.
Either pwsh.exe or PowerShell.exe must be in your PATH.
what should i do ?
when i wrote set path in command i got :
C:\Users\DELL>set path
path=C:\Windows\System32\WindowsPowerShell\v1.0;C:\Users\DELL\anaconda3;C:\Users\DELL\anaconda3\Library\mingw-w64\bin;C:\Users\DELL\anaconda3\Library\usr\bin;C:\Users\DELL\anaconda3\Library\bin;C:\Users\DELL\anaconda3\Scripts;C:\Users\DELL\AppData\Local\Programs\Python\Python39\Scripts\;C:\Users\DELL\AppData\Local\Programs\Python\Python39\;C:\Users\DELL\AppData\Local\Microsoft\WindowsApps;C:\Users\DELL\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\DELL\Downloads\flutter_windows_v1.12.13+hotfix.8-stable\flutter\bin;C:\Users\DELL\AppData\Roaming\npm;C:\php;C:\dart-sdk\bin;C:\flutter\bin;
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
Guys i found the answer:
i went to env => System variables => path (if u don't have one create one) => i added the path of :
C:\flutter\bin;
C:\Windows\System32;
C:\Program Files\Git\bin\git.exe;
C:\Program Files\Git\cmd;
C:\Windows\System32\WindowsPowerShell\v1.0
and now it works
C:\Users\DELL>flutter doctor
Running "flutter pub get" in flutter_tools... 14.1s
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 2.2.1, on Microsoft Windows [Version 10.0.18362.1256], locale en-US)
[√] Android toolchain - develop for Android devices (Android SDK version 30.0.0-rc4)
[√] Chrome - develop for the web
[√] Android Studio (version 4.1.0)
[√] IntelliJ IDEA Community Edition (version 2020.3)
[√] VS Code (version 1.56.2)
[√] Connected device (1 available)
• No issues found!
oh, so apparently it not a vey correct answer, so the asked output are:
C:\Users\DELL>%SystemRoot%\System32\reg.exe Query "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /V Path
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment
Path REG_SZ C:\flutter\bin;C:\Windows\System32;C:\Program Files\Git\bin\git.exe;C:\Program Files\Git\cmd;C:\Windows\System32\WindowsPowerShell\v1.0;
and
C:\Users\DELL>%SystemRoot%\System32\reg.exe Query HKCU\Environment /V Path
HKEY_CURRENT_USER\Environment
Path REG_EXPAND_SZ C:\Users\DELL\anaconda3;C:\Users\DELL\anaconda3\Library\mingw-w64\bin;C:\Users\DELL\anaconda3\Library\usr\bin;C:\Users\DELL\anaconda3\Library\bin;C:\Users\DELL\anaconda3\Scripts;C:\Users\DELL\AppData\Local\Programs\Python\Python39\Scripts\;C:\Users\DELL\AppData\Local\Programs\Python\Python39\;%USERPROFILE%\AppData\Local\Microsoft\WindowsApps;C:\Users\DELL\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\DELL\Downloads\flutter_windows_v1.12.13+hotfix.8-stable\flutter\bin;C:\Users\DELL\AppData\Roaming\npm;C:\php;C:\dart-sdk\bin;C:\flutter\bin;
and for the
C:\Users\DELL\Downloads\flutter_windows_v1.12.13+hotfix.8-stable\flutter\bin
i guess i will just delete it cause it an old one and i don't use it.
So after the suggested modification the output looks like this :
C:\Users\DELL>%SystemRoot%\System32\reg.exe Query "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /V Path
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment
Path REG_EXPAND_SZ %SYSTEMDRIVE%\flutter\bin;C:\Windows\System32;%PROGRAMFILES%\Git\bin;%PROGRAMFILES%\Git\cmd;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0;%SystemRoot%\System32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SystemRoot%\System32\OpenSSH;%SYSTEMDRIVE%\php;%SYSTEMDRIVE%\dart-sdk\bin;
and :
C:\Users\DELL>%SystemRoot%\System32\reg.exe Query HKCU\Environment /V Path
HKEY_CURRENT_USER\Environment
Path REG_EXPAND_SZ %USERPROFILE%\anaconda3;%USERPROFILE%\anaconda3\Library\mingw-w64\bin;%USERPROFILE%\anaconda3\Library\usr\bin;%USERPROFILE%\anaconda3\Library\bin;%USERPROFILE%\anaconda3\Scripts;%USERPROFILE%\AppData\Local\Programs\Python\Python39\Scripts;%USERPROFILE%\AppData\Local\Programs\Python\Python39;%USERPROFILE%\AppData\Local\Microsoft\WindowsApps;%USERPROFILE%\AppData\Roaming\npm;C:\php;C:\dart-sdk\bin;C:\flutter\bin;%USERPROFILE%\AppData\Local\Programs\Microsoft VS Code\bin;

[tag][!] Android Studio (not installed) [tag], Error when run flutter doctor on PC

i have installed latest version of android studio and flutter.
but when i run flutter doctor -v it shows following error [!] Android Studio (not installed)
flutter doctor output:
[√] Flutter (Channel stable, 2.2.0, on Microsoft Windows [Version 10.0.19043.985], locale en-US)
[√] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
[√] Chrome - develop for the web
[!] Android Studio (not installed)
[√] VS Code (version 1.56.2)
[√] Connected device (2 available)
! Doctor found issues in 1 category.
PS: flutter & dart plugins installed!
If android studio is installed correctly you can run the following command to change the path of android-studio installation:
flutter config --android-studio-dir="ANDROID STUDIO PATH HERE"
after this open a new terminal and run flutter doctor and you should see [√] Android Studio (version x.x.x)
you can install flutter&dart plug,and then restart.
android studio is installed correctly you can run the following command to change the path of the android-studio installation: >flutter config --android-studio-dir="C:\Program Files\Android\Android Studio" // please use your Android Studio Path.

Flutter error while adding web support to app

I just found out that I can change my flutter app to a website without writing external code. I decided to test it on my app but I got this error and I have no idea how to fix it. I followed the steps on the "website" but still I get the error. My stacktrace is :-
This application is not configured to build on the web.
To add web support to a project, run `flutter create .`.
Launching lib\main.dart on Web Server in debug mode...
Syncing files to device Web Server...
org-dartlang-app:/web_entrypoint.dart:8:8: Error: Error when reading 'lib/generated_plugin_registrant.dart': The system cannot find the file specified.
import 'package:discountapp/generated_plugin_registrant.dart';
^
org-dartlang-app:/web_entrypoint.dart:11:3: Error: Method not found: 'registerPlugins'.
registerPlugins(webPluginRegistry);
^^^^^^^^^^^^^^^
Failed to compile application.
I run flutter create . and it says
C:\Users\Hemant\AndroidStudioProjects\discountapp\ios>flutter create .
Recreating project ....
Wrote 3 files.
All done!
[√] Flutter: is fully installed. (Channel beta, 1.20.0-7.2.pre, on Microsoft Windows [Version 10.0.18363.959], locale en-US)
[√] Android toolchain - develop for Android devices: is fully installed. (Android SDK version 29.0.3)
[√] Chrome - develop for the web: is fully installed.
[√] Android Studio: is fully installed. (version 4.0)
[√] Connected device: is fully installed. (3 available)
In order to run your application, type:
$ cd .
$ flutter run
Your application code is in .\lib\main.dart.
C:\Users\Hemant\AndroidStudioProjects\discountapp\ios>flutter create .
Recreating project ....
Wrote 3 files.
All done!
[√] Flutter: is fully installed. (Channel beta, 1.20.0-7.2.pre, on Microsoft Windows [Version 10.0.18363.959], locale en-US)
[√] Android toolchain - develop for Android devices: is fully installed. (Android SDK version 29.0.3)
[√] Chrome - develop for the web: is fully installed.
[√] Android Studio: is fully installed. (version 4.0)
[√] Connected device: is fully installed. (3 available)
In order to run your application, type:
$ cd .
$ flutter run
Your application code is in .\lib\main.dart.
Running flutter run will run it on my phone. I will provide any code needed. Please help
You have to run flutter create . in application's root folder, but not in ios subfolder.
Rename ios folder to _ios
Run this command in your Terminal: flutter create --platforms=web .
Rename back _ios folder to ios
This will write all needed files to run your app on the browser.