Hi,
I have a bug trying to manage the Android SDK and tools with Intellij IDEA.
Abstract
The Android SDK installation went well, but the adb
command is somehow missing.
What I did exactly
In Intellij IDEA, Appearance & behaviour > System Settings > Android SDK Settings, I clicked on Edit
, checked everything (Android SDK and API 33 Android Tiramisu), let the location as is (home/romain/Android/Sdk
in this case), clicked Next, and let the tool do its job…
The installation went well (just one error, Unable to run mksdcard SDK tool
, but not sure it is relevant), and the tools are effectively installed in my home:
❯ ls -la /home/romain/Android/Sdk/platform-tools
total 14452
drwxr-xr-x 3 romain users 4096 2 mars 15:51 .
drwxr-xr-x 13 romain users 4096 2 mars 16:16 ..
-rwxr-xr-x 1 romain users 7933192 2 mars 15:51 adb
-rwxr-xr-x 1 romain users 57216 2 mars 15:51 dmtracedump
-rwxr-xr-x 1 romain users 305976 2 mars 15:51 etc1tool
-rwxr-xr-x 1 romain users 2465048 2 mars 15:51 fastboot
-rwxr-xr-x 1 romain users 13264 2 mars 15:51 hprof-conv
drwxr-xr-x 2 romain users 4096 2 mars 15:51 lib64
-rwxr-xr-x 1 romain users 262696 2 mars 15:51 make_f2fs
-rwxr-xr-x 1 romain users 262680 2 mars 15:51 make_f2fs_casefold
-rwxr-xr-x 1 romain users 873248 2 mars 15:51 mke2fs
-rw-r--r-- 1 romain users 1157 2 mars 15:51 mke2fs.conf
-rw-r--r-- 1 romain users 1070918 2 mars 15:51 NOTICE.txt
-rw-r--r-- 1 romain users 18335 2 mars 15:51 package.xml
-rw-r--r-- 1 romain users 38 2 mars 15:51 source.properties
-rwxr-xr-x 1 romain users 1492400 2 mars 15:51 sqlite3
But in the Notifications tab, now I have:
Cannot run program “/home/romain/Android/Sdk/platform-tools/adb”: error=2, No such file or directory
Same error if I try to run the adb
command in a terminal.
Some information
file
❯ file ~/Android/Sdk/platform-tools/adb
/home/romain/Android/Sdk/platform-tools/adb: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.24, not stripped
Versions
NixOS
❯ nixos-version
22.11.2912.d70f5cd5c3b (Raccoon)
IntelliJ IDEA
IntelliJ IDEA 2022.3.2 (Ultimate Edition)
Build #IU-223.8617.56, built on January 26, 2023
Runtime version: 17.0.5+10-nixos amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.