How to install Android SDK on Ubuntu?

Option 1:

sudo apt update && sudo apt install android-sdk

The location of Android SDK on Linux can be any of the following:

  • /home/AccountName/Android/Sdk
  • /usr/lib/android-sdk
  • /Library/Android/sdk/
  • /Users/[USER]/Library/Android/sdk

Option 2:

  • Download the Android Studio.
  • Extract downloaded .zip file.The extracted folder name will read somewhat like android-studio

To keep navigation easy, move this folder to Home directory.

  • After moving, copy the moved folder by right clicking it. This action will place folder’s location to clipboard.
  • Use Ctrl Alt T to open a terminal
  • Go to this folder’s directory using cd /home/(USER NAME)/android-studio/bin/
  • Type this command to make studio.sh executable: chmod +x studio.sh
  • Type ./studio.sh

A pop up will be shown asking for installation settings. In my particular case, it is a fresh install so I’ll go with selecting I do not have a previous version of Studio or I do not want to import my settings.

If you choose to import settings anyway, you may need to close any old project which is opened in order to get a working Android SDK.

From now onwards, setup wizard will guide you.

Android Studio can work with both Open JDK and Oracle’s JDK (recommended). Incase, Open JDK is installed the wizard will recommend installing Oracle Java JDK because some UI and performance issues are reported while using OpenJDK.

The downside with Oracle’s JDK is that it won’t update with the rest of your system like OpenJDK will.

The wizard may also prompt about the input problems with IDEA .

Select install type

Verify installation settings

An emulator can also be configured as needed.

The wizard will start downloading the necessary SDK tools

The wizard may also show an error about Linux 32 Bit Libraries, which can be solved by using the below command:

sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386 lib32z1

After this, all the required components will be downloaded and installed automatically.

After everything is upto the mark, just click finish

To make a Desktop icon, go to ‘Configure’ and then click ‘Create Desktop Entry’

source

Leave a Comment