Android SDK (Ubuntu 24.04)
Complete guide for setting up the Android SDK and Java environment required to run the Appy Builder on Ubuntu 24.04 LTS.
On this page
Prerequisites
Before installing the Android SDK, ensure your server meets the following requirements:
| Requirement | Minimum | Recommended |
|---|---|---|
| Operating System | Ubuntu 20.04 LTS | Ubuntu 24.04 LTS |
| RAM | 4 GB | 8 GB or more |
| Disk Space | 10 GB | 20 GB or more |
| Java | OpenJDK 17 | OpenJDK 17 |
Start by updating your system packages:
sudo apt update && sudo apt upgrade -y
Install required utilities:
sudo apt install wget unzip -y
Installing Java 17
The Android build tools require Java 17 (OpenJDK). Install it using the following command:
Install OpenJDK 17
sudo apt install openjdk-17-jdk -y
Verify Installation
java -version
Expected output:
openjdk version "17.0.17" 2025-10-21
OpenJDK Runtime Environment (build 17.0.17+10-Ubuntu-124.04)
OpenJDK 64-Bit Server VM (build 17.0.17+10-Ubuntu-124.04, mixed mode, sharing)
Verify Java Compiler
javac -version
Expected output: javac 17.0.17
Installing Android SDK
The Android SDK provides the tools needed to compile Android apps. We'll install the command-line tools and required SDK components.
Create SDK Directory
mkdir -p ~/android-sdk/cmdline-tools
Download Command-Line Tools
Navigate to the SDK directory:
cd ~/android-sdk/cmdline-tools
Download the latest Android command-line tools from Google:
wget https://dl.google.com/android/repository/commandlinetools-linux-11076708_latest.zip -O cmdline-tools.zip
Extract and Organize
Extract the downloaded archive:
unzip cmdline-tools.zip
Rename the extracted folder to latest:
mv cmdline-tools latest
Clean up the zip file:
rm cmdline-tools.zip
The SDK structure should now be: ~/android-sdk/cmdline-tools/latest/
Accept Licenses
yes | ~/android-sdk/cmdline-tools/latest/bin/sdkmanager --licenses
Install SDK Components
Install the required SDK packages for Android 15 (API 35):
~/android-sdk/cmdline-tools/latest/bin/sdkmanager "platform-tools" "platforms;android-35" "build-tools;35.0.0"
Note: The SDK download is approximately 500 MB. Ensure you have a stable internet connection.
Environment Variables
Set up the environment variables so the builder can locate Java and the Android SDK.
Edit ~/.bashrc
Add the following lines to your ~/.bashrc file:
# Android SDK
export ANDROID_HOME=$HOME/android-sdk
export PATH=$PATH:$ANDROID_HOME/cmdline-tools/latest/bin:$ANDROID_HOME/platform-tools
# Java
export JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64
export PATH=$PATH:$JAVA_HOME/bin
Also Add to ~/.profile
For non-interactive shells (like systemd services), add the same lines to ~/.profile:
nano ~/.profile
Add the same export statements at the end of the file.
Reload Shell Configuration
source ~/.bashrc
Verification
Verify that everything is installed correctly:
Check Java
java -version
echo $JAVA_HOME
Check Android SDK
echo $ANDROID_HOME
adb --version
sdkmanager --version
List Installed SDK Packages
sdkmanager --list_installed
Expected output:
Installed packages:
Path | Version | Description | Location
------- | ------- | ------- | -------
build-tools;35.0.0 | 35.0.0 | Android SDK Build-Tools 35 | build-tools/35.0.0
platform-tools | 36.0.2 | Android SDK Platform-Tools | platform-tools
platforms;android-35 | 2 | Android SDK Platform 35 | platforms/android-35
Success! Your Android SDK is now configured. Continue to the Builder Setup guide to run the appy-builder.
Troubleshooting
Error: "sdkmanager: command not found"
Cause: Environment variables not loaded or path incorrect.
Solution:
- Verify
ANDROID_HOMEis set:echo $ANDROID_HOME - Check the SDK structure:
ls -la ~/android-sdk/cmdline-tools/latest/bin/ - Re-source your profile:
source ~/.bashrc
Error: "JAVA_HOME is not set"
Cause: Java environment variable not configured.
Solution: Set the JAVA_HOME variable:
export JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64
Verify it's set:
echo $JAVA_HOME
Error: "Could not determine SDK root"
Cause: The command-line tools are not in the correct directory structure.
Solution: Ensure your SDK is structured as:
~/android-sdk/
cmdline-tools/
latest/
bin/
sdkmanager
avdmanager
lib/
platform-tools/
platforms/
build-tools/
Error: "Failed to accept SDK licenses"
Cause: Interactive prompts require user input.
Solution: Use the yes command to auto-accept:
yes | sdkmanager --licenses
Docker: "permission denied" errors
Cause: User not in docker group.
Solution: Add your user to the docker group:
sudo usermod -aG docker $USER
Then log out and back in, or run:
newgrp docker
© 2026 Titan Systems. All Rights Reserved.