How to install Android SDK and setup AVD Emulator without Android Studio (2024)

If you are trying to develop to Android, you probably will end up installing the Android Studio to get the Android SDK and the AVD Emulator working properly.

But if you are using another code editor, like Sublime Text or VSCode, installing the Android Studio will just mess up with your setup and consume your precious RAM for no good reason.

I had a hard time figuring out how to properly do this setup due the lack of documentation about it, so i hope this article helps you. 🙂

Recommended previous knowledge:

  • SDK (Standard Development Kit); Read about on Wikipedia;
  • AVD (Android Virtual Device); Read about on docs;
  • CLI (Command Line Interface); Read about on Wikipedia;
  • Android API levels; Read about on Vanderbilt University;
  • How to open, navigate and execute files in your OS terminal;
  • Know what are environmental variables;

Basically, the Android SDK is a bunch of packages necessary to develop for Android.

These packages stays in subfolders of a folder called “sdk” (or “android-sdk” sometimes). You do not need to know how these packages really work, just what they do.

The picture below is my Android SDK folder, these are the basic packages you will need in order to get everything working properly.

How to install Android SDK and setup AVD Emulator without Android Studio (1)

Here is a brief explanation of each package:

  • tools: This package is mainly used to manage the other packages and to create AVD’s;
  • emulator: As the name suggest, this is the Android emulator;
  • platform-tools: Some tools to communicate with Android devices when you plug then in your computer;
  • patcher: This package is automatically downloaded by the SDK. I didn’t find what exactly this is for, so just leave it as it is;

The folders bellow contain sub-folders with the packages for each Android API level.

  • platforms: The platform packages are required to compile your app for the specified API level.
  • system-images: These are the android images used in the emulator.
  • build-tools: These are necessary to build your Android apps

In order to install the SDK we will use the Command Line Tools. These are some quite simple CLI’s used to manage the Android SDK. You can read the documentation here for more details.

Step 1 — Download the tools package

First, you need to download the tools package. And with this package you can download the others.

  1. First, go to the Android Studio download page: https://developer.android.com/studio;
  2. Then click in “Download Options”;
  3. There you will find a table named “Command line tools only”;
  4. This table contain some zip files. Download the appropriate file for your system (Windows, Mac or Linux);
  5. Extract this zip and you will get a folder called tools: This is the tools package i explained earlier;

Create a folder anywhere you prefer to place your SDK. I recommend you to stick with one of these commonly used places:

on Windows:

  • Globally: C:\Android\sdk or C:\android-sdk (this is not default, but i usually set my SDK here on Windows)
  • One user only: C:\Users\<username>\AppData\Local\Android\sdk

on Linux

  • Globally: /opt/android/sdk or /opt/android-sdk
  • One user only: /home/<username>/.android/sdk

on MacOS

  • Globally: /Library/Android/sdk
  • One user only: /Users/<username>/Library/Android/sdk

And move the tools folder to this new sdk folder. Make sure you have admin access to this folder and any sub-folders inside it, or the tools package will fail to download new packages.

Note: You can also download a pre-build package for your SO (like the one available on Ubuntu repository). But i do not recommend you do to so, because they probably will not be updated and will be harder to manage, since it was automatically installed.

Step 2— You need Java 8!

The Android SDK packages require Java 8. If you do not have it, you need to download. If you are using a newer version, you have to downgrade to Java 8 or you will eventually get some errors, because it is not compatible.

If you do not have the Java 8 SDK, here is how you can install it:

On windows

On Ubuntu run these commands:

  • # sudo apt-get update
  • # sudo apt-get install openjdk-8-jdk

Sorry for MacOS users, i don’t know how to install it on this OS.

Step 3 — Download the essential packages

Now, download the platform-tools and the emulator packages, because they contain some CLI binary files you will need later. I decided to download these packages first in order to set all the necessary environment variables at once and make the rest of the process easier.

Open a terminal window (you need to use a terminal, not the file explorer), go to your sdk folder and navigate to the /tools/bin directory.

This folder contain the SDKManager binary: this is a CLI used to list the available packages in the Google’s repository and download, update or remove them from your SDK folder.

The bellow command will list all packages installed (the first items on the list) and all packages available to download:

# ./sdkmanager — list

To download the packages, simply copy the package names and pass it as a parameter to the SDKManager CLI using the terminal:

# ./sdkmanager platform-tools emulator

If you open your sdk folder you should see these packages folders there.

Step 4 — Set your environmental variables

You need to set the below environmental variables containing the path to our SDK, so any running program can find it in your pc:

ANDROID_SDK_ROOT = Path to your SDK folder

ANDROID_HOME = The same as ANDROID_SDK_ROOT. This variable is now deprecated, but i recommend setting it because some programs still using it to locate your sdk.

And add these folders to the PATH variable, making their binary files accessible from everywhere:

/opt/android-sdk/emulator

/opt/android-sdk/platform-tools

/opt/android-sdk/tools/bin

To add the environment variables on WIndows, just follow these steps:

  1. Open the “Control Panel”;
  2. Go to “System and Security” option in the side menu;
  3. In the window “System Properties” open the tab “Advanced”;
  4. Click in the button “Environment Variables” in the bottom of the page;
  5. In the “Environment Variables” window you will see two tables: “User Variables” and ”System Variables”.
  6. If you created your sdk folder for one user only, set the variables in the “User Variables” table;
  7. But, if you create your sdk folder globally, set the variables in the “System Variables” table instead;

On Linux, you can set your environment variables in many places. So i choose the ones I found the most appropriate:

  1. If you created your sdk folder for one user only, set your environment variables in the file ~/.bashrc;
  2. If you created your sdk folder globally, set your environment variables in the /etc/environment file. But, be very careful! if you do something wrong with the path variable in this file you will broke your system (yes, i did this). This file is not a script, so you can’t use variables like $HOME, you need to write the full path to the folders. Variables declared in this file just will take effect after you logout .

Here is how i set these variables in my Ubuntu, using the file /etc/environment:

PATH=”/opt/android-sdk/emulator:/opt/android-sdk/platform-tools:/opt/android-sdk/tools/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games”

ANDROID_SDK_ROOT=”/opt/android-sdk”

ANDROID_HOME=”/opt/android-sdk”

And sorry again, no MacOS instructions for this task.

You can find more about these environmental variables in the oficial docs here.

Now your SDK is ready! If you do not need to run the emulator there’s no need to follow the next steps.

Step 5 — Download the platform specific packages you want

You need more three packages: The platform, the system-image and the build-tools. You can download these packages for any Android version you prefer. In this article, i will download the packages for the API Level 28.

Use the “sdkmanager — list” command to find these packages and download them using the command “sdkmanager <package name>”.

Here’s an example:

# sdkmanager “platforms;android-28”

# sdkmanager “system-images;android-28;default;x86”

# sdkmanager “build-tools;28.0.3”

Step 5 — Create a AVD device

Creating a AVD device is a simple task: run the AVDManager command (this is a binary file located in the tools/bin folder of your sdk) with the create avd option, a name for the new AVD and the image you want to use.

Here is a example:

# avdmanager create avd — name android28 — package “system-images;android-28;default;x86”

You will be asked if you want to alter some configurations. You can also modify these configurations later in the file config.ini, located in the avd folder (this folder usually is created in your user folder, under the android directory). The currently active configurations can be find in the file hardware-qemu.ini (this file just will be created after the emulator runs for the first time).

Step 6 — Run the Android Emulator

Now you just need to run the emulator command (remember that we added this package to the environmental variables?):

# emulator -avd <your_avd_name>

or just:

# emulator @<your_avd_name>

The emulator take some time to init for the first time. But if you done everything correctly you should see this screen:

How to install Android SDK and setup AVD Emulator without Android Studio (2)

How to install Android SDK and setup AVD Emulator without Android Studio (2024)

FAQs

Can I install sdk without Android Studio? ›

You will need to download the Android SDK without Android Studio bundled. Go to Android SDK and navigate to the SDK Tools Only section. Copy the URL for the download that's appropriate for your build machine OS. Unzip and place the contents within your home directory.

How do I manually download android emulator? ›

How to manually install a select version of emulator
  1. Locate your SDK installation directory. ...
  2. Rename the existing emulator directory in the SDK installation directory, because you'll unzip the newly downloaded emulator directory here in the next step. ...
  3. Unzip the emulator zip file you downloaded.

How do I install AVD? ›

To create a new AVD:
  1. Open the Device Manager.
  2. Click Create Device. The Select Hardware window appears. ...
  3. Select a hardware profile, and then click Next.
  4. Select the system image for a particular API level, and then click Next.
  5. Change AVD properties as needed, and then click Finish.

How install Android SDK tools on Windows? ›

In your browser on the PC, open the Android SDK download page and click Download the SDK Tools ADT Bundle for Windows. On the Get the Android SDK page, you can select either 32-bit or 64-bit, according to your Windows platform. This download includes the SDK tools and the Eclipse IDE.

Which Android SDK platform should I install? ›

According to Microsofts article "Which Android SDK packages should I install?" Install the "SDK Platform" for the Android versions you've set as minimum & target.

How do I know if Android SDK is installed? ›

Navigate to “Appearance & Behavior” > “System Settings” > “Android SDK” and now you can see the SDK versions that were installed in the “API Level” and “Name” columns (focus on “API Level”).

How do I manually run an emulator? ›

Start the Android SDK Manager (select Start | All Programs | Embarcadero RAD Studio | Android Tools). In the Android SDK Manager, click the Tools menu and select Manage AVDs. In the Android Virtual Device Manager, select the emulator and click Start. Then click Launch on the Launch Options dialog box.

How do I make my own emulator? ›

To create your own Android emulator that runs under Windows:
  1. Download and install VirtualBox. ...
  2. Download the latest version of Android x86 from android-x86.org. ...
  3. Launch VirtualBox.
  4. Click New. ...
  5. Enter "Android x86" for name then select Linux and Other Linux under Type and Version and click Next.
7 May 2013

What is Virtual Device and SDK manager explain? ›

The Android SDK includes a virtual mobile device emulator that runs on your computer. The emulator lets you prototype, develop and test Android applications without using a physical device.

How do I install emulators on Android? ›

How to Install an Android Emulator?
  1. Go to the official download page for Android Studio.
  2. Click on “DOWNLOAD OPTIONS.”
  3. Choose which file to download. Note: This depends on the type of device you are using.
  4. Locate the downloaded file on your computer and run the installation.
  5. Follow the on-screen instructions.
19 Apr 2021

Which is best virtual device for Android Studio? ›

Comparison of Top 5 Android Emulators for PC and MAC
Android EmulatorRatingSupported Platforms
LDPlayer4.7/5Android, Windows.
BlueStacks4.6/5Android, Microsoft Windows, and Apple MacOs.
Nox Player4.4/5Android and Microsoft Windows, MacOs.
Ko Player4.1/5Android, MacOs and Microsoft Windows.
2 more rows
24 Sept 2022

Where can I find AVD Manager? ›

The AVD Manager is a tool you can use to create and manage Android virtual devices (AVDs), which define device configurations for the Android Emulator. To launch the AVD Manager: In Android Studio, select Tools > Android > AVD Manager, or click the AVD Manager icon in the toolbar.

How do I find Android SDK path? ›

Navigate to the File > Settings option you will get to see below dialog screen. Inside that screen. Click on Appearance and Behavior option > System Settings options and then click on the Android SDK option to get to see the below screen. Inside this screen, you will get to see your SDK path.

How do I get platform tools for Android SDK? ›

Install Latest Version of Android SDK Platform Packages and Tools
  1. On the Android Studio landing page, select Configure > SDK Manager.
  2. From your Android Studio application toolbar, select Tools > Android > SDK Manager.
  3. From your Android Studio application toolbar, click SDK Manager.

Where is the Android SDK folder? ›

Method #1: Open the Run Window

Paste %localappdata%\Android\Sdk , which is Android SDK's default location in Windows.

How do I download and install Android SDK? ›

Double-click the executable ( .exe file) to start the install. Make a note of the name and location where you save the SDK on your system—you will need to refer to the SDK directory later when using the SDK tools from the command line. Once the installation completes, the installer starts the Android SDK Manager.

What does SDK stand for? ›

SDK is the acronym for “Software Development Kit”. The SDK brings together a group of tools that enable the programming of mobile applications. This set of tools can be divided into 3 categories: SDKs for programming or operating system environments (iOS, Android, etc.)

What SDK tools should I install? ›

If you're an Android developer, you should get the latest SDK Platform-Tools from Android Studio's SDK Manager or from the sdkmanager command-line tool.

Why do we need to install JDK and sdk? ›

Android developers mostly used Java programming languages to build Android apps and if we want to use java tools or functionality, so we have to install Java JDK. It is the Java Development Kit (JDK) released by Oracle Corporation.

What is sdk and JDK in Android? ›

A Software Development Kit, or an SDK, is a collection of tools that you need to develop an application for a specific software framework. For example, to develop applications in Java, you need a Java SDK (JDK). SDKs contain binaries, source code for the binaries, and documentation for the source code.

How do I fix Android SDK is missing or corrupted? ›

The Cause for this error -SDK tools package might not be installed. Quick fix: Go to the Tools –> SDK manager –> SDK tools. Deselect Hide obsolete packages option on the right bottom and further install Android SDK Tools(obsolete). A new folder named Tools is now generated in the SDK directory.

How can I run AVD without HAXM? ›

You can use an emulator with the ARM image instead of HAXM provided that you installed it in the SDK manager. Check your SDK manager to see if you have an ARM image instead for the API level you want, then go to the AVD manager and make a virtual device using ARM as the cpu. thank your for answer.

Does Android emulator use graphics card? ›

By default, the emulator decides whether to use hardware or software graphics acceleration based on your computer setup. If your GPU hardware and drivers are compatible, the emulator uses the GPU. Otherwise, the emulator uses software acceleration (using your computer's CPU) to simulate GPU processing.

How do I run an emulator from command prompt? ›

Starting the emulator

Use the emulator command to start the emulator, as an alternative to running your project or starting it through the AVD Manager. Here's the basic command-line syntax for starting a virtual device from a terminal prompt: emulator -avd avd_name [ {- option [ value ]} … ]

Is emulation more CPU or GPU? ›

The CPU is definitely the biggest factor in the ability of your PC to play games on emulators, as it does all or most of the simulation of the console hardware.

Is building an emulator hard? ›

Writing emulators is hard because you must exactly/completely/absolutely replicate said hardware behaviour, including it's OS behaviour in software. Writing emulators for older consoles was in some cases harder than writing emulators for modern consoles.

How much RAM do I need for ps2 emulator? ›

Hardware requirements
MinimumRecommended
Personal Computer
Memory4 GB RAM.8 GB RAM.
Graphics hardwareDirectX 10 or OpenGL 3.x supported GPU and 2 GB VRAM.DirectX 11 or OpenGL 4.5 supported GPU and 4 GB VRAM.
2 more rows

What is the difference between SDK and AVD? ›

The former is called SDK Manager, which integrates easy updates for the Software Development Kit (SDK), including tools, platforms, and other components into packages. The latter is AVD Manager, which allows you to create and manage Android Virtual Devices (AVDs). AVDs are basically device emulators.

Is emulator same as AVD? ›

Android Emulator architecture

The Android Emulator runs the Android operating system in a virtual machine called an Android Virtual Device (AVD). The AVD contains the full Android software stack, and it runs as if it were on a physical device. Figure 1 is a diagram of the Android Emulator's high-level architecture.

What is the difference between simulator and emulator in Android? ›

Simulation. A simulator creates an environment that mimics the behaviors, variables, and configurations that exist in an app's production environment. On the other hand, an emulator mimics all of the hardware and software features for the production environment of a real device.

Is Android Studio an sdk? ›

Android SDK comes bundled with Android Studio, Google's official integrated development environment (IDE) for the Android operating system. You can learn about Android Studio and the Android App Development Kit in another of my articles.

Can I use react native without Android Studio? ›

You will need Node, the React Native command line interface, a JDK, and Android Studio. While you can use any editor of your choice to develop your app, you will need to install Android Studio in order to set up the necessary tooling to build your React Native app for Android.

How can I run a flutter app without Android Studio? ›

Installing Flutter In Windows (But without android studio)

Install Android SDK for windows from Link and create folders ( android\cmdline-tools\latest ) and add path to android folder as ANDROID_SDK_ROOT, then extract the android sdk contents inside latest folder and add path upto bin in env path as well.

Do you have Android build tools installed at? ›

Android SDK Build-Tools is a component of the Android SDK required for building Android apps. It's installed in the <sdk>/build-tools/ directory.

How do I install Android SDK? ›

Within Android Studio, you can install the Android 12 SDK as follows:
  1. Click Tools > SDK Manager.
  2. In the SDK Platforms tab, select Android 12.
  3. In the SDK Tools tab, select Android SDK Build-Tools 31.
  4. Click OK to install the SDK.
4 Oct 2021

What is difference between Android Studio and SDK? ›

Android SDK belongs to "Frameworks (Full Stack)" category of the tech stack, while Android Studio can be primarily classified under "Integrated Development Environment".

Why Android SDK is not installed? ›

Open the Tools\Options\Xamarin\Android Settings and set a new Android SDK Location (the folder should not exists). automatically the IDE detect that the Android SDK is not installed and it will propose you to install all the required components. after that open the Tools\Android\Android SDK Manager...

Is React Native same as Android Studio? ›

Android provides a rich application framework that allows you to build innovative apps and games for mobile devices in a Java language environment. On the other hand, React Native is detailed as "A framework for building native apps with React".

Is React Native better than flutter? ›

Flutter is easier to use as it is more resistant to system updates. It means that when iOS or Android update the OS, the app will remain the same. On the contrary, React Native depends on native elements, so when the update is released, some problems may appear in the launch app.

Can we develop Android app using React Native? ›

With React Native, developers can write real, natively rendering mobile applications for iOS and Android. It helps build apps on two platforms at once, while maintaining the look, feel, and productivity of an app built on the specific iOS or Android platform. Developers use React for several reasons.

Can we run flutter on VS code without Android Studio? ›

We can run a flutter program in android emulator or we can run this in our browser as well. For running in the android emulator we must have the android studio installed in our system. For this article, we are going to test this program in our browser.

Is flutter easier than Android Studio? ›

"Android studio is a great tool, getting better and bet " is the primary reason why developers consider Android Studio over the competitors, whereas "Hot Reload" was stated as the key factor in picking Flutter. Flutter is an open source tool with 69.5K GitHub stars and 8.11K GitHub forks.

How do I download Android SDK for flutter? ›

How to Install and Configure Flutter SDK on Windows 10
  1. Step 1: Download Flutter SDK. ...
  2. Step 2: Extract the Files. ...
  3. Step 3: Update Path Variable for Windows PowerShell. ...
  4. Step 4: Confirm Installed Tools for Running Flutter. ...
  5. Step 5: Download and Install Android Studio. ...
  6. Step 6: Install Visual Studio (Optional)
15 Apr 2022

How do I find Android SDK build tools? ›

To open the SDK Manager from Android Studio, click Tools > SDK Manager or click SDK Manager in the toolbar. If you're not using Android Studio, you can download tools using the sdkmanager command-line tool.

How do I download sdk build tools? ›

Install Latest Version of Android SDK Platform Packages and Tools
  1. On the Android Studio landing page, select Configure > SDK Manager.
  2. From your Android Studio application toolbar, select Tools > Android > SDK Manager.
  3. From your Android Studio application toolbar, click SDK Manager.

How do I use third party sdk on Android? ›

How to add third party SDK in android studio
  1. Copy and paste jar file in libs folder.
  2. Add dependency in build. gradle file.
  3. then clean the project and build.
8 Oct 2016

Top Articles
Latest Posts
Article information

Author: Golda Nolan II

Last Updated:

Views: 5929

Rating: 4.8 / 5 (78 voted)

Reviews: 93% of readers found this page helpful

Author information

Name: Golda Nolan II

Birthday: 1998-05-14

Address: Suite 369 9754 Roberts Pines, West Benitaburgh, NM 69180-7958

Phone: +522993866487

Job: Sales Executive

Hobby: Worldbuilding, Shopping, Quilting, Cooking, Homebrewing, Leather crafting, Pet

Introduction: My name is Golda Nolan II, I am a thoughtful, clever, cute, jolly, brave, powerful, splendid person who loves writing and wants to share my knowledge and understanding with you.