Search code examples
androidflutteropenjdk-11

Flutter doctor can't find sdkmanager


So I'm trying to install flutter without Android Studio because my PC work really slow whenever i trying to open Android Studio. Everything working smoothly at beginning, but when flutter trying to get Android License using

flutter doctor --android-licenses

it always give me

C:\Windows\System32>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.

and when i'm check using

flutter doctor --android-licenses -v

it give me

C:\Windows\System32>flutter doctor --android-licenses -v
Android sdkmanager not found. Update to the latest Android SDK and ensure that the cmdline-tools are installed to
resolve this.

#0      throwToolExit (package:flutter_tools/src/base/common.dart:10:3)
#1      AndroidLicenseValidator.runLicenseManager (package:flutter_tools/src/android/android_workflow.dart:422:7)
#2      Doctor.diagnose (package:flutter_tools/src/doctor.dart:295:38)
#3      DoctorCommand.runCommand (package:flutter_tools/src/commands/doctor.dart:50:47)
#4      FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:1274:12)
<asynchronous suspension>
#5      FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart:1125:27)
<asynchronous suspension>
#6      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
<asynchronous suspension>
#7      CommandRunner.runCommand (package:args/command_runner.dart:209:13)
<asynchronous suspension>
#8      FlutterCommandRunner.runCommand.<anonymous closure>
(package:flutter_tools/src/runner/flutter_command_runner.dart:288:9)
<asynchronous suspension>
#9      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
<asynchronous suspension>
#10     FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:236:5)
<asynchronous suspension>
#11     run.<anonymous closure>.<anonymous closure> (package:flutter_tools/runner.dart:62:9)
<asynchronous suspension>
#12     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
<asynchronous suspension>
#13     main (package:flutter_tools/executable.dart:92:3)
<asynchronous suspension>

is there is anything wrong with my PATH or something hat i need to do first? I will include my path if that can help me. enter image description here

enter image description here

Thank you.


Solution

  • It looks like you might be missing the command-line tools.

    If you want to install the command-line tools without installing Android studio then I would suggest taking a look at this website here. It lists all the android sdk tools you can download without needing to install android studio.

    If you do want to install android studio I was able to solve this problem just recently by going to Tools>SDK Manager>SDK Tools and selecting "Android SDK Command-line Tools (latest)", then hit okay to install the tools.

    After you do that try doing flutter doctor --android-licenses again