08.1 SDK (without Android Studio)
Open a new terminal window and Download the Android Command Line Tools zip file for Linux. I'm going to save it in my Downloads folder (~/Downloads) At the time of writing this
commandlinetools-linux-7583922_latest.zip
is the latest version. You may need to update the commands to match whatever version you downloadI prefer to keep my SDK in an Android folder in my home folder (
~/Android
), but it's up to you where you keep it, just remember where it is because we'll need to reference it in a minute.cd ~ && mkdir Android && cd Android
Move the zip in to this folder, unzip the contents, delete the zip file, open the folder 'cmdline-tools', make a folder called 'tools' and move everything in to the newly created 'tools' folder
The next command will do everything mentioned above. It looks like a lot, but it's just because I tried to make this as simple as possible by giving you a single one-liner chain of commands. Don't forget to replace the name of the zip file if yours is different.
mv ~/Downloads/commandlinetools-linux-7583922_latest.zip ./ && unzip commandlinetools-linux-7583922_latest.zip && rm commandlinetools-linux-7583922_latest.zip && cd cmdline-tools && mkdir tools && mv -i * tools
That warning at the end kinda scared us, let's just get some re-assurance and make sure everything went as planned
ls tools
You should see the folders
bin
andlib
and then a few other files in there. Good stuff.The next step will vary depending on what shell your terminal is using. If you're not sure what that means, you're probably using BASH, but let's double check anyway
echo $SHELL
You will probably see something like
/usr/bin/bash
or/usr/bin/zsh
If you're using bash, we'll need to edit
.bash_profile
. If you're using zsh you've probably got.zshrc
nano ~/.bash_profile
At the end of the file add the following
export ANDROID_HOME=$HOME/Android export PATH=$ANDROID_HOME/cmdline-tools/tools/bin/:$PATH export PATH=$ANDROID_HOME/emulator/:$PATH export PATH=$ANDROID_HOME/platform-tools/:$PATH
See what we did there? We're setting the "home" directory for our Android stuff to
~/Android
and telling it where our command line tools stuff is located.Save (
Ctrl + O
,Enter
) and exit (Ctrl + X
)Close your terminal window and open a new one
Check to see if sdkmanager installed correctly.
sdkmanager --version
Install the SDK. At the time of writing this, shSMS is looking for at least 27, so let's do 30 because yolo.
sdkmanager --install "platform-tools" "platforms;android-30" "build-tools;30.0.3" "emulator"
We good?? I hope so! If you encountered any errors in this process and you're not sure about them, copy/paste it in to whatever search engine you prefer. There's a really good chance that you're not the first person to encounter that issue and someone has figured out a solution.
You might not believe this, but there's only ONE MORE STEP!!! Let's build that damn APK and rejoice!
Last updated