skip to Main Content

enter image description hereenter image description here

I clicked on "install Dart" from Android Studio as shown above. then I ran these commands choco install dart-sdk, choco upgrade dart-sdk

and these are the output

C:WINDOWSsystem32>choco install dart-sdk
Chocolatey v0.10.15
Installing the following packages:
dart-sdk
By installing you accept licenses for the packages.
dart-sdk v2.19.6 already installed.
 Use --force to reinstall, specify a version to install, or try upgrade.

Chocolatey installed 0/1 packages.
 See the log for details (C:ProgramDatachocolateylogschocolatey.log).

Warnings:
 - dart-sdk - dart-sdk v2.19.6 already installed.
 Use --force to reinstall, specify a version to install, or try upgrade.

C:WINDOWSsystem32>choco upgrade dart-sdk
Chocolatey v0.10.15
Upgrading the following packages:
dart-sdk
By upgrading you accept licenses for the packages.
dart-sdk v2.19.6 is the latest version available based on your source(s).

Chocolatey upgraded 0/1 packages.
 See the log for details (C:ProgramDatachocolateylogschocolatey.log).

I tried to ran Flutter doctor:

[√] Flutter (Channel stable, 3.7.9, on Microsoft Windows [Version 10.0.19045.2846], locale en-US)
[√] Windows Version (Installed version of Windows is version 10 or higher)
[!] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    X cmdline-tools component is missing
      Run `path/to/sdkmanager --install "cmdline-tools;latest"`
      See https://developer.android.com/studio/command-line for more details.
    X Android license status unknown.
      Run `flutter 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
[√] Visual Studio - develop for Windows (Visual Studio Community 2022 17.2.6)
[√] Android Studio (version 2021.2)
[√] IntelliJ IDEA Community Edition (version 2020.3)
[√] VS Code (version 1.77.2)
[√] Connected device (3 available)
[√] HTTP Host Availability

After trying to run flutter doctor --android-licenses:

Android sdkmanager not found. Update to the latest Android SDK and ensure that the cmdline-tools are installed to resolve this.

2

Answers


  1. try this: open Android Studio and go to SDK Manager, switch to the SDK Tools tab and check Android SDK Command-line Tools (latest) after the installation, run flutter doctor again.

    Login or Signup to reply.
  2. https://docs.flutter.dev/development/packages-and-plugins/using-packages

    open your project in visual studio code
    
    from a visual studio code terminal run flutter pub upgrade (advances packages to the current version)
    or run flutter pub add (first time usage)
    
    Flutter saves the concrete package version found in the pubspec.lock lockfile.
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search