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:
  • 634 Vote(s) - 3.54 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Android sdkmanager tool not found

#1
[![enter image description here][1]][1]I newly started using Ubuntu 18.0 LTS this week, switching from Windows, and wanted to install Android Studio and Flutter back. I followed all the steps as said to install Android Studio and it is working fine with all the SDKs. However, when I wanted to install Flutter, it gives exception:

Doctor summary (to see all details, run flutter doctor -v):
Unhandled exception:
Exception: Android sdkmanager tool not found (/usr/lib/android-sdk/tools/bin/sdkmanager).
Try re-installing or updating your Android SDK,
visit

[To see links please register here]

for detailed instructions.
Ask for the stacktrace if you need it.

The closest issue I could find was:

[To see links please register here]

but I couldn't really understand how to work the instructions. I might need you to be really clear in the instructions because I'm new to the linux platform.

**tools/package.xml :**

<ns2:repository xmlns:ns2="http://schemas.android.com/repository/android/common/01"
xmlns:ns3="http://schemas.android.com/sdk/android/repo/addon2/01"
xmlns:ns4="http://schemas.android.com/sdk/android/repo/sys-img2/01"
xmlns:ns5="http://schemas.android.com/repository/android/generic/01"
xmlns:ns6="http://schemas.android.com/sdk/android/repo/repository2/01">
<license id="apache-2.0" type="text">Please refer to Apache v2.0 license</license>
<localPackage path="tools" obsolete="false">
<type-details xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:type="ns5:genericDetailsType"/>
<revision>
<major>25</major>
<minor>0</minor>
<micro>0</micro>
</revision>
<display-name>Android SDK Tools</display-name>
<uses-license ref="apache-2.0"/>
<dependencies>
<dependency path="platform-tools">
<min-revision>
<major>20</major>
</min-revision>
</dependency>
</dependencies>
</localPackage>
</ns2:repository>


[1]:


**Flutter doctor -v output:**

[✓] Flutter (Channel beta, v0.7.3, on Linux, locale en_IN)
• Flutter version 0.7.3 at /home/andi/Downloads/flutter
• Framework revision 3b309bda07 (13 days ago), 2018-08-28 12:39:24 -0700
• Engine revision af42b6dc95
• Dart version 2.1.0-dev.1.0.flutter-ccb16f7282

[!] Android toolchain - develop for Android devices (Android SDK 28.0.2)
• Android SDK at /home/andi/Android/Sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-28, build-tools 28.0.2
• ANDROID_HOME = /home/andi/Android/Sdk
• Java binary at: /home/andi/Downloads/android-studio-ide-173.4907809-linux/android-studio/jre/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01)
! Some Android licenses not accepted. To resolve this, run: flutter doctor --android-licenses

[✓] Android Studio (version 3.1)
• Android Studio at /home/andi/Downloads/android-studio-ide-173.4907809-linux/android-studio
• Flutter plugin version 28.0.1
• Dart plugin version 173.4700
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01)

[!] Connected devices
! No devices available

! Doctor found issues in 2 categories.
Reply

#2
I had this issue when I installed on Ubuntu. You need to set env variable ANDROID_HOME to the path you installed the android sdk for flutter to work.

So assuming you installed the SDK in your home directory, open a terminal and issue this command

ANDROID_HOME=~/Android-SDK flutter doctor
If that worked, then add the env variable to your profile to make it persistent, by adding

export ANDROID_HOME=~/Android-SDK
to your ~/.profile script, then relogin to Ubuntu.

Obviously if you installed the android sdk in a different directory, you just need to replace ~/ with the directory, so for example if you installed the sdk to /opt, then the command would be
ANDROID_HOME=/opt/Android-SDK flutter doctor

Having checked my android sdk + flutter setup, I also ended up adding the following to my path

~/Android-SDK/platform-tools

You can test this before messing with your profile, by the following command in a terminal

PATH=$PATH:~/Android-SDK/platform-tools ANDROID_HOME=~/Android-SDK flutter doctor
And again change ~/Android-SDK to wherever you installed the android SDK. If it works, change your profile accordingly and relogin to Ubuntu.
Reply

#3
I had this issue after installed on my KUbuntu.

You need to open **AndroidStudio** then go to **Tools** -> **SDK Manager** then go to **SDK Tools** tab, uncheck the option `Hide Obsolete Packages`

You will see the option of **Android SDK Tools (Obsolete)**, check the option and continue the process download and installation.

[![See the screenshot here][1]][1]


[1]:
Reply

#4
I'm using Manjaro Linux. After set my `ANDROID_HOME` and install Android **SDK Command-line tools (latest**) from Android Studio.

And ran:

[flutter doctor --android-licenses][1]


$ mkdir ~/Android/Sdk/tools/bin
And created a link to the real path

$ ln -s ~/Android/Sdk/cmdline-tools/latest/bin/sdkmanager ~/Android/Sdk/tools/bin/sdkmanager

Ran again and accept all

$ flutter doctor --android-licenses

[flutter doctor][2]


[1]:

[2]:
Reply

#5
If you come across this error when accepting SDK licenses.
```
➜ ~ 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
```

the structure of the initial android-sdk was :
```
android-sdk
├── build-tools
│   ├── 29.0.3 -> debian
│   └── debian
│   └── lib
├── cmdline-tools
│   ├── tools
│   │   ├── bin
```
and the way i was able to configure android licenses was to change the structure of the android-sdk directory by changing 'tools' to 'latest'

```
android-sdk
├── build-tools
│   ├── 29.0.3 -> debian
│   └── debian
│   └── lib
├── cmdline-tools
│   ├── latest
│   │   ├── bin
| | |
```
Reply

#6
I'm always puzzled why an installation package shouldn't contain all necessary dependencies but cause trouble (perhaps fun) to so many people?

Anyway, I'd like to add something to the [zmofsx][1] [solution][2] because, for me, the solution didn't fix the problem completely, and I had to do a few more steps described below.

Hope those may help someone in troubleshooting.

So after the steps described [above][2], I did the following in the console:

flutter doctor --android-licenses

Hit Y to show all the licences and Y to each of them. Then

flutter doctor

And this is my console output:

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.0.5, on Ubuntu 20.04.4 LTS 5.4.0-122-generic, locale en_GB.UTF-8)
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
[✓] Chrome - develop for the web
[✓] Linux toolchain - develop for Linux desktop
[✓] Android Studio (version 2021.2)
[✓] Android Studio
[✓] VS Code (version 1.69.2)
[✓] Connected device (2 available)
[✓] HTTP Host Availability

• No issues found!

Then tested the result:

mkdir flutter_example
cd flutter_example
flutter create .
flutter run -d linux

And got the app running:
[![enter image description here][3]][3]


[1]:

[To see links please register here]

[2]:

[To see links please register here]

[3]:
Reply

#7
use the tool of config from Flutter
```bash
flutter config --android-sdk ~/Android/Sdk/
flutter config --android-studio-dir ~/android-studio/
```
after accept licences
`flutter doctor --android-licenses `

Reply

#8
To fix the Android sdkmanager not found warning:

1. Open Android Studio
2. From the top toolbar, select **Tools > SDK Manager**.
3. Select the **SDK Tools tab**, with a blue underline.
4. Uncheck 'Hide Obsolete Packages'.
5. Tick `Android SDK Command-line Tools (latest)`.

[![enter image description here][1]][1]
6. Click **Ok**

[1]:


Screenshot of Android Studio Electric Eel.
Reply

#9
For those using pop_os 22 and have installed the android studio using flatpak
the problem is that the android studio is isolated so you need to config the path for android-sdk and android-studio-dir

flutter config --android-sdk ~/Android/Sdk
flutter config -android-studio-dir path/android-studio

for pop_os installed from shop you'll find it here /home/<username>/.local/share/flatpak/app/com.google.AndroidStudio/current/active/files/extra/android-studio

then you will run `flutter doctor --android-licenses` and accepts all licenses so now `flutter doctor` will not show a error.

Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

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