You can nudge your life in a new direction every day.

Exact steps to get Android SDK Command Line tools to work with Java

Submitted by admin on Sat, 04/24/2021 - 16:35

Android SDK Command-Line Tools documentation references a directory structure like below

 

Located in: android_sdk/cmdline-tools/version/bin/

 

 

cd  andriod_sdk

wget https://dl.google.com/android/repository/commandlinetools-linux-6858069_latest.zip

unzip commandlinetools-linux-6858069_latest.zip

cd cmdline-tools

mkdir tools

mv NOTICE.txt bin lib source.properties -t tools

cd tools

cd bin

 

unset JAVA_OPTS

 

 

The sdkmanager is a command line tool that allows you to view, install, update, and uninstall packages for the Android SDK.

 

$HOME/develop/android_sdk/cmdline-tools/tools/bin

./sdkmanger    (just to make sure it was working)

./sdkmanager --update

./sdkmanager --list

./sdkmanager "platform-tools" "platforms;android-30" "build-tools;30.0.3"