Skip to content

Intermediate: Android basics · Android Studio and your first app · topic 18 of 50 · 35 min

Setting up Android Studio, an emulator and your phone

Explanation

Android Studio is the official free tool (IDE) for building Android apps. It includes the Android SDK, an emulator that runs a virtual phone on your computer, and tools for building and debugging. 8 GB of RAM is a workable minimum and 16 GB is comfortable. You can also run apps on your own phone by turning on Developer options and USB debugging.

What you are installing

PartWhat it is
Android StudioThe IDE (integrated development environment): editor, designer, debugger, all in one. Based on IntelliJ IDEA.
Android SDKSoftware Development Kit: the Android libraries and tools your app is built against, one "platform" per Android version.
GradleThe build system that compiles your code and packages it into an app file.
EmulatorA virtual Android phone that runs on your computer.

Installing

  1. Download Android Studio from developer.android.com/studio (Windows, macOS, Linux). Always use the official site.
  2. Run the installer and follow the Setup Wizard with the "Standard" option; it downloads the SDK, platform tools and an emulator image.
  3. Let it finish downloading (several GB). A stable internet connection helps; this happens once.
  4. Open Android Studio and create a new project with the "Empty Activity" template, which uses Jetpack Compose.

Hardware advice: Android Studio and the emulator are heavy. 8 GB of RAM works if you close other apps; 16 GB is comfortable. An SSD makes builds much faster. If your computer is slow, run apps on a real phone instead of the emulator.

Creating an emulator (AVD)

An AVD (Android Virtual Device) is a configuration for the emulator: which phone shape, which Android version. Open Device Manager in Android Studio, click Create, pick a phone such as a Pixel model, choose a recent system image, and finish. Press the Run button and pick the emulator.

The emulator needs hardware acceleration (virtualisation) to be fast. On Windows this usually means turning on virtualisation (VT-x or AMD-V) in the BIOS settings and having the Windows Hypervisor Platform feature enabled. Android Studio shows a warning with a link if acceleration is missing.

Running on your own phone

  1. On the phone, open Settings > About phone and tap Build number seven times. A message says you are now a developer. (On some brands, Build number is under Software information.)
  2. Open the new Developer options (often in Settings > System) and turn on USB debugging.
  3. Connect the phone with a USB data cable. Accept the "Allow USB debugging?" prompt on the phone.
  4. The phone appears in Android Studio's device list. Press Run.

You can also use Wireless debugging (Android 11 and later): pair the phone with Android Studio over the same Wi-Fi network using a QR code or pairing code, with no cable needed.

bash
adb devices
adb (Android Debug Bridge) lists connected devices. It comes with the SDK platform tools.
Think of it like this: Android Studio is your workshop, the SDK is the box of standard parts, Gradle is the assembly machine, and the emulator is a test phone on your desk. Your own phone is the real road test.

Common mistakes

  • Downloading Android Studio from unofficial sites. Use developer.android.com only.
  • A charge-only USB cable: the phone never appears. Use a data cable.
  • Missing virtualisation, so the emulator is extremely slow or refuses to start. Enable it in BIOS, or use a real phone.
  • Revoking the debugging prompt by accident. Unplug, replug and accept "Allow" again.

Need help?

Stuck on a word or an idea? Search this course, or every course, and jump straight to the explanation or a worked question.

Try:

Watch the lesson

Setting up Android Studio, an emulator and your phone · 1/6

Android Studio = IDE

Android Studio is the official free tool for building Android apps.

Prefer a video by a teacher? Find free videos on “install android studio emulator usb debugging setup” on YouTube ↗

In real life: Building on a budget laptop

A college student in Lucknow has a laptop with 8 GB of RAM. The emulator makes everything slow, so she enables Developer options on her own phone and uses Wireless debugging. Builds now install on her phone in seconds, she tests on a real device with a real network, and she keeps the emulator only for checking another Android version occasionally.

Practice (0/3 done)

Task 1 · Question

How do you unlock Developer options on most Android phones?

Task 2 · Question

The phone is connected but never appears in Android Studio. What should you check first?

Task 3 · Practice

Install Android Studio, create an Empty Activity project named HelloIndia, run it on an emulator, then enable Developer options and USB (or wireless) debugging on your phone and run it there too.

Quick quiz

Question 1

1.What is the Android SDK?

Question 2

2.What is an AVD?

Question 3

3.What does adb devices do?

Question 4

4.Your laptop has 8 GB of RAM and the emulator is very slow. What is a good option?

Read more (free)

Open a question to see the answer and why. The first ones are this topic's own quiz, so try the quiz above before you peek.

What is the Android SDK?

Answer: The libraries and tools your app is built against

SDK means Software Development Kit.

What is an AVD?

Answer: A virtual device configuration for the emulator

AVD means Android Virtual Device.

What does adb devices do?

Answer: Lists connected devices

adb is the Android Debug Bridge.

Your laptop has 8 GB of RAM and the emulator is very slow. What is a good option?

Answer: Run the app on a real phone with USB or wireless debugging

Real devices are fast and realistic for testing.

Does the Flutter SDK include Dart?Related

Answer: Yes, Dart is bundled

The Flutter SDK ships with the Dart SDK.

From Installing Flutter

What is the recommended modern way to build Android screens?Related

Answer: Jetpack Compose with Kotlin

Compose is Android's recommended UI toolkit.

From Kotlin and Android: the big picture

What do you need to install to BUILD C# programs?Related

Answer: The .NET SDK

The SDK has the compiler and the dotnet tools. The runtime alone can only run built apps.

From Installing .NET and using the dotnet CLI

What does dart format --set-exit-if-changed do in CI?Related

Answer: Fails the job if any file is not formatted

Enforces consistent style.

From Integration tests and CI

Pass the quiz (60% or more) or mark this topic as done when you are ready.

Your progress is saved on this device only.

Next steps

  1. 3 more topics in “Android Studio and your first app” before its exam: Project structure and Gradle, Activities and the lifecycle, Hello Compose: your first screen.
  2. Module 5 exam: Android Studio and your first app · 12 questions · 20 min, without help. 4 topics of this module still to finish first.
  3. Then the next module, Jetpack Compose UI. 50 topics left in the course before the final exam.

← Previous: Flow and StateFlow