Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 631 Vote(s) - 3.5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
I am getting error "cmdline-tools component is missing" after installing Flutter and Android Studio... I added the Android SDK. How can I solve them?

#1
Android toolchain - I develop for Android devices (Android SDK version 30.0.3):

```lang-none
X cmdline-tools component is missing
Run `path/to/sdkmanager --install "cmdline-tools;latest"`
See

[To see links please register here]

for more details.
```

[1]:





Reply

#2
The solution for me was opening Android Studio and going to *SDK Manager*, switch to the *SDK Tools* tab and check *Android SDK Command-line Tools (latest)*.

[![Enter image description here][1]][1]

Don't forget to add to your PATH the tools and platform-tools folder that are inside your SDK.

[1]:





Reply

#3
If what `flutter doctor` said was something like:

```lang-none
[!] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
• Android SDK at /Users/<admin>/Library/Android/sdk
✗ cmdline-tools component is missing
Run `path/to/sdkmanager --install "cmdline-tools;latest"`
```

The `path/to/sdkmanager` for me was:

/Users/<user>/Library/Android/sdk/tools/bin/sdkmanager


So what solved the whole thing for me was running:

/Users/<user>/Library/Android/sdk/tools/bin/sdkmanager --install "cmdline-tools;latest"
Reply

#4
My solution process is as follows:

1. `~/Library/Android/sdk/tools/bin/sdkmanager --install "cmdline-tools;latest"`

```lang-none
Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/bind/annotation/XmlSchema
at com.android.repository.api.SchemaModule$SchemaModuleVersion.<init>(SchemaModule.java:156)
at com.android.repository.api.SchemaModule.<init>(SchemaModule.java:75)
at com.android.sdklib.repository.AndroidSdkHandler.<clinit>(AndroidSdkHandler.java:81)
at com.android.sdklib.tool.sdkmanager.SdkManagerCli.main(SdkManagerCli.java:73)
at com.android.sdklib.tool.sdkmanager.SdkManagerCli.main(SdkManagerCli.java:48)
Caused by: java.lang.ClassNotFoundException: javax.xml.bind.annotation.XmlSchema
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:636)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:182)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:519)
... 5 more
```

2. Install Android SDK Command-line Tools in Android Studio:

*Preferences* → *Appearance & Behavior* → *System Settings* → *Android SDK* → *SDK Tools* → *Android SDK Command-line Tools (latest)*

3. `flutter doctor`

```lang-none
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 2.5.0, on macOS 11.5.2 20G95 darwin-x64, locale zh-Hans-CN)
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
[✓] Xcode - develop for iOS and macOS
[✓] Chrome - develop for the web
[✓] Android Studio (version 2020.3)
[✓] IntelliJ IDEA Ultimate Edition (version 2021.2)
[✓] IntelliJ IDEA Ultimate Edition (version 2021.2)
[✓] Connected device (2 available)

• No issues found!
```





Reply

#5
If you are a Mac user, just open your terminal and paste:

```lang-none
cd Library/Android/sdk/tools/bin./sdkmanager --install "cmdline-tools;latest"
```

And hit <kbd>Enter</kbd>.

This command will install the latest version of *cmdline-tools*.

Then, run `flutter doctor`, and the error will be gone.




Reply

#6
[![Enter image description here][1]][1]

**Easiest solution:**

- Open Android Studio and click settings in the upper left corner of Android studio.
- Search for "SDK tools" in the search box.
- From the SDK tools just check the *Android SDK Platform Tools*.
- Run `flutter doctor` to verify. You can also restart Android Studio if you want. <br/>
I hope the problem will be solved.

[1]:

Reply

#7
Android SDK Manager screenshot on Windows

[![Enter image description here][1]][1]

Please see the attached screenshot for installing tools from SDK Manager.

[1]:

Reply

#8
For Linux ([Ubuntu][1])

Just copy this command in your terminal and change 'your user name' with your user name without spaces:

```lang-none
/home/your user name/Android/Sdk/tools/bin/sdkmanager --install "cmdline-tools;latest"
```

[1]:

[To see links please register here]

Reply

#9
I solved this problem on Windows 10 with the following actions:

1. Run the following command in a Windows command prompt or Flutter console:

```lang-none
flutter config --android-sdk "C:\Users\'your computer name' AppData\Local\Android\Sdk"
```
(you may need to find and enter your own SDK path)

The Android SDK location could be found in the Android Studio application* → *Appearance & Behavior* → *System Settings* → *Android SDK*

2. Open your Android Studio, and then → *File* → *Settings* → *Appearance & Behavior* → *System Settings* → *Android SDK* → *SDK Tools* → download Android SDK Command-line Tools (latest) and you are good to go.


Reply

#10
If you have installed the latest cmd-line tools from Android Studio, but it still gives the error, then you should do the following.

If you have installed the Android SDK to a custom directory, then you need to copy the path of your SDK folder. Then you have to go to the edit environment variable, click <kbd>New</kbd> give
a variable name: **ANDROID_SDK_ROOT**. And a variable value: **path of your SDK folder**.
Click <kbd>OK</kbd>.

In the older version of Flutter, this error came with the solution (creating ANDROID_SDK_ROOT), but in the new versions it does not show that.



Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through