USB debugging doesn’t work with physical device/cmdline-tools component is missing/flutter

Issue

I created an app and my problem is that I can’t debug via USB cable because it doesn’t recognize my Smartphone.

If I run flutter doctor it shows me this error:

Android toolchain - develop for Android devices (Android SDK version
    32.1.0-rc1)
    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

If I run path/to/sdkmanager --install "cmdline-tools;latest" it doesn’t do anything.

Does anyone have a solution for my problem?

Solution

  1. For the First Problem, Open Android Studio and Go to SDK Manager > SDK Tools there you will find Android SDK Command-line Tools check the checkbox and press Apply button to install it.

enter image description here

  1. For the second problem just enter the command flutter doctor --android-licenses on Terminal/Command Prompt and accept all the licenses.

Answered By – Muhammad Usama Siddiqui

Answer Checked By – Clifford M. (FlutterFixes Volunteer)

Leave a Reply

Your email address will not be published. Required fields are marked *