- Download Android Studio from developer.android.com/studio and install it (keep "Android Virtual Device" ticked).
- First start: choose Standard setup; it downloads the Android SDK, platform tools and an emulator image.
- New Project → Empty Views Activity → Name: MyApp, Language: Java, Minimum SDK: API 24 → Finish.
- Tools → Device Manager → Create Device → Pixel 6 → system image (e.g. API 34) → Next → Finish.
- Press the green Run ▶ button and pick the AVD. Wait for the emulator to boot; the app opens.
Output
The emulator opens a phone window and the app shows in the centre: Android Studio is ready! Running on: sdk_gphone64_x86_64 Android version: 14 API level: 34 (The model and version are those of the AVD you created.)
// FILE: activity_main.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:orientation="vertical"
android:padding="24dp">