Downloading the Android SDK 29+ (command line tools for Android) from https://developer.android.com/studio#downloads.
For "commandlinetools-linux-7302050_latest.zip" the process was different from earlier approaches. Earlier after unpacking, the top folder was called tools
, but now the top folder is called cmdline-tools
.
The problem seems to be that the sdkmanager expects to reside in an environment called. /YOURPATH/cmdline-tools/SOMETHING/bin
but unpacks to /YOURPATH/cmdline-tools/bin
for Linux anyway.
if you get
Error: Could not determine SDK root.
Error: Either specify it explicitly with --sdk_root= or move this
package into its expected location: <sdk>/cmdline-tools/latest/
Unpack and make sure you have this path to the sdkmanager.
/YOURPATH/cmdline-tools/latest/bin/sdkmanager
How To
To get this to work, first create the path to your intended Android SDK /opt/android-sdk/cmdline-tools/
then unpack the SDK zip file to that location, and you will have
/opt/android-sdk/cmdline-tools/cmdline-tools/bin/sdkmanager
Now rename the second "cmdline-tools" to "latest"
/opt/android-sdk/cmdline-tools/latest/bin/sdkmanager
And now it should work.