androidflutterandroid-emulator

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


I was following a tutorial to install an android emulator, without android studio, and I was told to run the command- flutter doctor. Upon running this, I got this error-

X Android license status unknown.
      Run `flutter doctor --android-licenses` to accept the SDK licenses.

So I tried running flutter doctor --android-licenses, and I got this error-

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

This is my ANDROID_HOME directory-

enter image description here

And Inside platforms, I have android-32 installed.

I saw some fixes for this, but those were all with android studio. How do I fix this? Thanks in advance!


Solution

  • If you're using the command line tool without android studio been installed todevelop mobile app here's a way around this issue I was able to resolve it.

    enter image description here

    First check if there are packages to be updated

    sdkmanager --list
    

    if there are then run the command below ensure you've good internet connection and power

    sdkmanager --update
    

    Next run

    sdkmanager --install "cmdline-tools;latest"
    

    Next run the command below and the error will not be there again.

    flutter doctor --android-licenses
    
    flutter doctor 
    

    and you're good to go!!! enter image description here