0

I'm trying to get my very first Flutter application up and running. When I ran flutter doctor it was saying that I was missing Android SDK, so I installed sdkmanager and ran:

sdkmanager "platform-tools" "platform;android-29" "build-tools;28.0.3" 

From there I ran flutter config --android-sdk /opt/android-sdk

I got an error saying that I'm missing cmdline-tools, however I don't have Android Studio and don't want to as well. So I went on Android Studio's website and downloaded a manual cmdline-tools and moved the file to android-sdk. OK so far so good, right? No, now I needed to run flutter doctor --android-licenses and it's saying Android sdkmanager not found. Why? Is there something I'm missing? I'm doing all of this in Ubuntu.

  • Below is the image of flutter doctor status
  • Shows me running flutter doctor --android-licenses
  • As well as shows the path to the android-sdk in the terminal
  • I have as well set flutter config --android-sdk to the correct path and is the reason why flutter doctor has no issues with finding the android-sdk

Image!!

  • https://stackoverflow.com/a/69164282/13984728 this is what you searching for... its a duplicate question – Mithson May 11 '22 at 17:05

2 Answers2

0

Android toolchain - develop for Android devices X cmdline-tools component is missing run path/to/sdkmanager --install "cmdline-tools;latest"

This error means your "Android SDK Command-line Tools are missing"

  1. Open Android Studio
  2. In the Menu bar , click Tools(4th last)
  3. choose SDK Tools panel
  4. Tick Android SDK Command-line Tools
  5. Click Apply at bottom of the window
Manishyadav
  • 1,361
  • 1
  • 8
  • 26
  • Im using linux and dont want to install android studio. I have tried running 'path/to/sdkmanager --install "cmdline-tools;latest". Doesnt work. I think this is because im on unix shell. – houranihussein May 10 '22 at 12:51
  • but the android studio should be present for flutter development , please show your `flutter doctor` status – Manishyadav May 10 '22 at 14:44
  • I have updated the OP to contain the image of my OS with both the terminal showing the android-sdk path and displaying that I have accepted the license in cmdline-tools – houranihussein May 10 '22 at 21:33
0

I gave up and just downloaded android studio using snap package manager and within android studio I did the steps discussed above.

After downloading cmdline-tools from android studio. I have just set the android config --android-sudio-dir "toMyAndroidStudioPath" example. /home/myName/Android/Sdk....

  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community May 12 '22 at 20:19