How to install Android SDK on Ubuntu?
For my Ubuntu machine, I downloaded the latest version of Android SDK from this page. After extracting the downloaded .tgz file, I was trying to search for installation instructions and found:
To get started on Linux: Unpack the .zip file you’ve downloaded. The SDK files are download separately to a user-specified directory. Make a note of the name and location of the SDK directory on your system—you will need to refer to the SDK directory later when using the SDK tools from the command line.
there’s an easy install paolorotolo.github.io/android-studio — or check this tutorial on how do it manualy — youtube.com/watch?v=qfinKxwYYZs
@Tasos Any idea about the maintenance and long term support paolorotolo’s Android studio? This looks more of a personal project 🙁
Android Studio itself alerts you when there is a new update/upgrade so you do it from there. I dont think the person modified AS
from my last comment — however you can ask that question directly to the person here — github.com/PaoloRotolo/android-studio/issues
9 Answers 9
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
- 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 .
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’
building android sdk tools (aapt, adb, etc.) for arm/arm64
I am currently interested in building the Android SDK tools (aapt, adb, etc.) for the ARM-v7a and ARM64-v8a architectures so that it can be run directly on an Android device. Is this possible? I was able to build the Android SDK tools for x86/x86_64 pretty easily following the documentation. https://source.android.com/setup To do this, I performed the following steps.
mkdir ~/WORKING_DIRECTORY cd ~/WORKING_DIRECTORY repo init -u https://android.googlesource.com/platform/manifest -b master -g all,-notdefault,tools repo sync . build/envsetup.sh lunch sdk-eng make sdk
As mentioned above, this will build the android SDK tools for x86/x86_64. I am just not sure how I can build the tools for other architectures. I am aware that you can specify the desired architecture to the make targets. For example, «make aosp_arm-eng» which will build the image for the arm environment. However, when I tried «make sdk_arm-eng», it told me that the target did not exist. Any help would be greatly appreciated. EDIT: It looks like Debian has arm/arm64 packages for aapt and other android tools here. https://packages.debian.org/buster/aapt However, these will be unable to run on the actual android device it seems because of dependencies.
/android-sdk/ndk-bundle/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/bin/aarch64-linux-android-readelf -a aapt | grep Shared Type: DYN (Shared object file) 0x0000000000000001 (NEEDED) Shared library: [libaapt.so.0] 0x0000000000000001 (NEEDED) Shared library: [libutils.so.0] 0x0000000000000001 (NEEDED) Shared library: [libstdc++.so.6] 0x0000000000000001 (NEEDED) Shared library: [libm.so.6] 0x0000000000000001 (NEEDED) Shared library: [libgcc_s.so.1] 0x0000000000000001 (NEEDED) Shared library: [libc.so.6] 0x0000000000000001 (NEEDED) Shared library: [ld-linux-aarch64.so.1]