I’m having issues in my new flutter installation tried few things but nothing worked.
This is the view of my flutter doctor
output:
[!] Android toolchain – develop for Android devices (Android SDK
version 33.0.2)
• Android SDK at C:UsersMy PCAppDataLocalAndroidsdk
X cmdline-tools component is missing
Runpath/to/sdkmanager --install "cmdline-tools;latest"
See https://developer.android.com/studio/command-line for more details.
X Android license status unknown.
Runflutter doctor --android-licenses
to accept the SDK licenses.
See https://flutter.dev/docs/get-started/install/windows#android-setup for
more details. [√] Chrome – develop for the web
• Chrome at C:Program Files (x86)GoogleChromeApplicationchrome.exe [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 2022.1)
• Android Studio at C:Program FilesAndroidAndroid Studio
• Flutter plugin can be installed from:
https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 11.0.15+0-b2043.56-9505619) [√] VS Code (version 1.76.2)
• VS Code at C:UsersMy PCAppDataLocalProgramsMicrosoft VS Code
• Flutter extension version 3.60.0 [√] Connected device (3 available)
• Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.19044.2604] • Chrome (web) • chrome • web-javascript • Google Chrome 111.0.5563.65
• Edge (web) • edge • web-javascript • Microsoft Edge 111.0.1661.41 [√] HTTP Host Availability
• All required HTTP hosts are available
Tried uninstalling android studio and updating path
3
Answers
Try to install those two (SDK and Build Tools):
For the first issue:
Open Android Studio go to
SDK Manager
then underSDK Tools
tab tickAndroid SDK Command-line Tools (latest)
then clickApply
button. It will then download and install the Android SDK Command-line Tools. After that clickOk
and close Android Studio. Then from Windows Terminal runflutter doctor --android-licenses
, accept all the licenses. To check runflutter doctor
again. This issue should be solved.For the second issue:
On Windows Flutter uses Visual Studio to compile applications. Therefore you need to install Visual Studio. You can find Visual Studio Community from Microsoft by searching for "Visual Studio Community".
Please check this link for further details, [Windows setup][1].
Just to be sure you can run
flutter doctor
again. You should have everything set.[1]: https://docs.flutter.dev/get-started/install/windows
You need to install cmdline tools in order to use flutter ,after that you need to accept android-licenses using
flutter doctor --android-licenses
and accept all the licenses