Setup Android SDK Without Android Studio – Complete Easy Guide 2026

Introduction

Most Android development tutorials assume you have Android Studio installed and running before anything else. That works for many developers. But what about someone who is working on a low-RAM laptop where Android Studio eats up all available memory? Or a developer setting up an automated build server where no graphical interface exists? In those situations, learning to setup Android SDK without Android Studio is not just convenient — it is necessary.

The good news is that Android Studio is not actually required to build Android apps. It is a helpful tool, but everything it does under the hood — downloading SDK packages, compiling code, communicating with devices — can be done directly from the terminal. Once you setup Android SDK without Android Studio, you get a lightweight environment that runs on almost any machine, works inside Docker containers, and can be fully automated in CI/CD pipelines.

This guide covers every step in clear, simple language. No experience with server setup or advanced terminal commands is assumed. By the end, you will have a fully working Android development environment running entirely from the command line.

Why Developers Choose to Setup Android SDK Without Android Studio

Android Studio is a powerful IDE, but it comes with real trade-offs that push many developers toward a command-line setup.

The most obvious one is resource usage. Android Studio on an average machine uses 1.5 to 2.5 GB of RAM just at idle. On a machine with 4 GB or 8 GB total, that leaves very little room for running emulators, browsers, or other tools simultaneously.

The second reason is portability. When you setup Android SDK without Android Studio, your entire environment fits in a single folder. You can zip it, copy it to another machine, or rebuild it from a script in minutes. An Android Studio installation involves installers, wizards, and settings scattered across multiple locations.

The third reason is automation. Build servers, CI pipelines, and Docker images need the Android SDK configured automatically without any human clicking through a wizard. The command-line approach makes that straightforward.

What the Android SDK Actually Contains

Before starting the installation, it helps to understand what components you are actually installing when you setup Android SDK without Android Studio.

The Android SDK is not a single file — it is a collection of separate packages. Each package serves a specific purpose. Here is what you need for a working setup:

The Command-Line Tools package contains the management utilities — mainly sdkmanager and avdmanager. These are the tools you use to download and manage everything else.

Platform-Tools contains ADB (Android Debug Bridge) and fastboot. ADB is what lets you connect to Android devices, install apps, and view logs from your terminal.

SDK Platforms are the Android OS version packages. Each one matches an API level. You need the platform that corresponds to your app’s compileSdk setting.

Build-Tools are the compilation utilities — aapt2, d8, zipalign — that actually transform your source code into a runnable APK file.

The Emulator package lets you run virtual Android devices if you do not have a physical phone available for testing.

That is the complete picture. Once you setup Android SDK without Android Studio and have these packages in place, you have a full Android development environment.

Step 1 – Check That Java Is Installed

The Android SDK command-line tools are Java-based applications. Before anything else, verify that Java is installed on your system.

Run this command in your terminal:

java -version

If Java is installed, you will see a version number. In 2026, Android development tools work best with Java 17. If Java is not installed or you have an older version, install JDK 17 first.

On Ubuntu or Debian Linux:

sudo apt update sudo apt install openjdk-17-jdk

On macOS using Homebrew:

brew install openjdk@17

On Windows, download the JDK 17 installer from https://adoptium.net and run it. That site provides free, open-source Java builds that work well with Android tools.

After installation, run java -version again to confirm. You should see something like openjdk version 17.x.x before continuing.

Step 2 – Download the Command-Line Tools Package

To setup Android SDK without Android Studio, the starting file you need is the Command-Line Tools package. Google provides this as a standalone ZIP download that does not require any installer.

Open your browser and go to:

https://developer.android.com/studio

Scroll past the main Android Studio download section. Further down the page, you will find a section labeled “Command line tools only.” It lists separate download links for Windows, macOS, and Linux.

Download the ZIP file for your operating system. The file is around 130 to 150 MB. It only contains the base management tools — not the full SDK. That comes in the next steps.

On Linux, you can also use wget directly in your terminal. Copy the download link from the browser and use:

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

Replace XXXXXXXX with the actual build number from the link you copied. Always use the current link from the official site rather than hardcoding an old one.

Step 3 – Create the Required Directory Structure

This step is where many first-timers run into trouble. The command-line tools require a very specific folder layout to work correctly. If you extract the ZIP into a random folder without following this structure, sdkmanager will throw errors about an invalid SDK root.

First, decide where your SDK will live. Pick a permanent location because changing it later means updating environment variables. Common choices:

On Linux or macOS: ~/android-sdk or /opt/android-sdk On Windows: C:\android-sdk or inside your user folder

Create the following folder structure manually:

android-sdk/ cmdline-tools/ latest/

Now extract the downloaded ZIP. Inside the extracted folder you will find a cmdline-tools directory containing bin, lib, and a few other files. Copy everything inside that cmdline-tools folder into the latest folder you just created.

The final result should look like this:

android-sdk/ cmdline-tools/ latest/ bin/ lib/ NOTICE.txt source.properties

The latest folder name is not arbitrary. The sdkmanager tool specifically looks for this path when determining the SDK root. Without it, nothing works.

Step 4 – Configure Environment Variables

Environment variables tell your operating system where to find the SDK tools when you type commands in the terminal. This is an essential part of any attempt to setup Android SDK without Android Studio because there is no IDE to handle path configuration automatically.

You need to set the ANDROID_HOME variable and add several paths to your system PATH.

On macOS and Linux

Open your shell configuration file in a text editor. For Zsh users (default on modern macOS):

nano ~/.zshrc

For Bash users:

nano ~/.bashrc

Add these lines at the bottom:

export ANDROID_HOME=$HOME/android-sdk export PATH=$PATH:$ANDROID_HOME/cmdline-tools/latest/bin export PATH=$PATH:$ANDROID_HOME/platform-tools export PATH=$PATH:$ANDROID_HOME/emulator

Save the file and reload the configuration:

source ~/.zshrc

On Windows

Right-click the Start button and choose System. Click Advanced System Settings on the left side. In the window that opens, click Environment Variables.

Under System Variables, click New. Set the variable name as ANDROID_HOME and the value as your SDK path, for example:

C:\android-sdk

Next, find the variable named Path in the list and click Edit. Add these four entries as separate lines:

%ANDROID_HOME%\cmdline-tools\latest\bin %ANDROID_HOME%\platform-tools %ANDROID_HOME%\emulator

Click OK on all open windows to save. Close and reopen any terminal windows for the changes to apply.

Verifying the Setup

Run this command to confirm everything is configured correctly:

sdkmanager –version

If a version number appears, the tools are accessible and your environment variables are working. This is the first real confirmation that you are successfully on track to setup Android SDK without Android Studio.

Step 5 – Accept License Agreements

Google requires you to accept their SDK license agreements before downloading any packages. This is a one-time step and must be completed before sdkmanager will install anything.

Run:

sdkmanager –licenses

The tool displays several license texts. After each one, it prompts you to type y to accept or n to decline. Accept all of them. There are usually six to eight separate licenses.

For automated scripts or CI environments where you cannot type interactively, use:

yes | sdkmanager –licenses

This pipes an automatic y response to every prompt. It is the standard technique used in Docker builds and cloud CI setups when there is no human to click through prompts.

Step 6 – Install the SDK Packages You Need

With licenses accepted, you are ready to start downloading SDK packages using sdkmanager. This is the main installation step when you setup Android SDK without Android Studio.

Install Platform-Tools First

Platform-Tools contains ADB and fastboot. Install it first because ADB is needed for device communication:

sdkmanager “platform-tools”

Install an Android SDK Platform

Install the Android platform matching your project’s compileSdk or targetSdk. For Android 14 (API level 34):

sdkmanager “platforms;android-34”

For Android 13 (API level 33):

sdkmanager “platforms;android-33”

You can install multiple platforms side by side. Each one takes roughly 60 to 100 MB of disk space.

Install Build-Tools

Build-Tools are required to compile Android apps. Your project specifies a version in its build.gradle file:

sdkmanager “build-tools;34.0.0”

If you are starting fresh and not sure which version to pick, 34.0.0 works with most modern Android projects.

Install the Emulator and System Image (Optional)

If you want to test on a virtual device rather than a physical phone, install the emulator and a system image:

sdkmanager “emulator” sdkmanager “system-images;android-34;google_apis;x86_64”

On Apple Silicon Macs, use the ARM image:

sdkmanager “system-images;android-34;google_apis;arm64-v8a”

Install Everything in One Command

For convenience, you can install all required packages in a single line:

sdkmanager “platform-tools” “platforms;android-34” “build-tools;34.0.0” “emulator” “system-images;android-34;google_apis;x86_64”

This is especially useful in setup scripts that automate the entire process.

Step 7 – Create and Launch an Android Emulator

If you installed the emulator and system image, creating a virtual device takes one command using avdmanager:

avdmanager create avd –name “TestPhone_API34” –package “system-images;android-34;google_apis;x86_64” –device “pixel_6”

The name flag sets the emulator’s identifier. The package flag must exactly match the system image you installed. The device flag sets the hardware profile — run avdmanager list device to see all available options.

Launch the emulator with:

emulator -avd TestPhone_API34

To run without a GUI window (for servers or CI):

emulator -avd TestPhone_API34 -no-window &

Verify the emulator is running and ADB can see it:

adb devices

A line showing emulator-5554 device confirms it is up and ready. This step proves that your entire setup Android SDK without Android Studio environment is working correctly end to end.

Step 8 – Connect Your SDK to an Android Project

The last practical step is telling your Android project where the SDK is installed. Android projects use a file called local.properties in the root folder for this.

Create or edit local.properties and add:

On Linux or macOS:

sdk.dir=/home/yourname/android-sdk

On Windows:

sdk.dir=C:\android-sdk

Note the double backslash on Windows — the properties file format requires it.

With local.properties configured, you can build your project entirely from the terminal using the Gradle wrapper:

./gradlew assembleDebug

This command compiles your app and produces a debug APK at app/build/outputs/apk/debug/ with no IDE involvement at all. It is the final proof that the entire setup Android SDK without Android Studio process is complete and working.

Keeping Your SDK Updated Over Time

Once your setup is running, ongoing maintenance only needs occasional attention.

To update all installed packages:

sdkmanager –update

To check what is currently installed:

sdkmanager –list_installed

To install an additional build-tools version a project needs:

sdkmanager “build-tools;33.0.2”

To remove a package you no longer use:

sdkmanager –uninstall “build-tools;31.0.0”

Running sdkmanager –update every few weeks keeps your tools current. ADB updates in particular are worth applying promptly because newer Android phone releases sometimes require a newer ADB version for proper USB debugging connectivity.

Automating This Setup for CI/CD and Docker

One of the biggest advantages of choosing to setup Android SDK without Android Studio is how easily the process can be scripted for automated environments.

Here is a minimal shell script that handles the complete setup on a Linux server:

mkdir -p ~/android-sdk/cmdline-tools cd /tmp wget -q https://dl.google.com/android/repository/commandlinetools-linux-11076708_latest.zip unzip -q commandlinetools-linux-11076708_latest.zip mv cmdline-tools ~/android-sdk/cmdline-tools/latest export ANDROID_HOME=~/android-sdk export PATH=$PATH:$ANDROID_HOME/cmdline-tools/latest/bin:$ANDROID_HOME/platform-tools yes | sdkmanager –licenses > /dev/null sdkmanager “platform-tools” “platforms;android-34” “build-tools;34.0.0”

Always fetch the latest download URL from the official site before running this in production. The filename contains a build number that changes with each release.

In a Dockerfile, replace the export commands with ENV instructions:

ENV ANDROID_HOME=/root/android-sdk ENV PATH=$PATH:/root/android-sdk/cmdline-tools/latest/bin:/root/android-sdk/platform-tools

This approach makes your Docker image fully self-contained and reproducible — every build starts from the exact same SDK configuration.

Common Problems and Quick Fixes

A few issues come up repeatedly when developers first attempt to setup Android SDK without Android Studio.

sdkmanager not found after setting PATH — Close and reopen the terminal. Environment variable changes only take effect in new terminal sessions. On macOS, also verify that the right shell config file was edited (zshrc versus bashrc).

Warning about SDK root directory — The cmdline-tools folder structure is incorrect. The bin and lib folders must be inside cmdline-tools/latest/, not directly inside cmdline-tools/. Review Step 3.

sdkmanager shows a Java class error on startup — The JDK is missing or is the wrong version. Confirm Java 17 is installed and that java -version returns the expected output.

gradlew assembleDebug fails with SDK location not found — The local.properties file is missing or has the wrong path. Check that sdk.dir points to the exact folder where your android-sdk is located.

ADB does not detect a connected phone — On the phone, go to Settings, then Developer Options, and confirm USB Debugging is enabled. Also try running adb kill-server then adb start-server to reset the ADB daemon, then reconnect the USB cable.

Final Conclusion

The idea of working without Android Studio feels unfamiliar at first, mostly because tutorials almost never show this path. But the reality is that once you setup Android SDK without Android Studio, you realize how straightforward Android development can be at its core. A small folder of tools, a few environment variables, and a handful of commands — that is genuinely all you need.

Whether you are trimming memory usage on your development laptop, configuring a build server, or creating a portable development environment that you can replicate on any machine in minutes, this approach delivers. The process covered in this guide works on Windows, macOS, and Linux, and the same commands that run on your laptop will run identically inside a Docker container or on a cloud CI system.

Once the initial setup is done, maintaining it requires almost no effort. You run sdkmanager when a project needs a package you do not have, and everything else takes care of itself.

For the most current download links and tool documentation, refer to the official Android command-line tools page and the sdkmanager reference guide on the Android developer site.

Related Posts

Target SDK 35 vs 36: What New Developers Need to Know

Introduction If you have started building an Android app recently, you have probably come across two settings in your project that mention SDK numbers — compileSdk and targetSdk. Most tutorials…

Android SDK Manager – How to Save Disk Space Easily in 2026

Introduction One thing nobody warns you about when you first start Android development is how quickly the SDK folder grows. You install Android Studio, let it download a few things…

Leave a Reply

Your email address will not be published. Required fields are marked *

You Missed

Target SDK 35 vs 36: What New Developers Need to Know

Target SDK 35 vs 36: What New Developers Need to Know

Setup Android SDK Without Android Studio – Complete Easy Guide 2026

Setup Android SDK Without Android Studio – Complete Easy Guide 2026

Android SDK Manager – How to Save Disk Space Easily in 2026

Android SDK Manager – How to Save Disk Space Easily in 2026

Install and Update Android SDK – Complete Step-by-Step Guide 2026

Install and Update Android SDK – Complete Step-by-Step Guide 2026

Android SDK Platforms and Tools – The Ultimate Practical Guide 2026

Android SDK Platforms and Tools – The Ultimate Practical Guide 2026

5 Common Android SDK Errors and How to Fix Them in 2026

5 Common Android SDK Errors and How to Fix Them in 2026