Development of mobile applications for Android is impossible without testing on real devices or their virtual analogues. The emulator Android Studio allows you to run and debug applications without the need to connect a physical smartphone, simulating different OS versions, screen resolutions and hardware configurations. However, many beginners encounter difficulties during the first setup: from the lack of a system image to startup errors.
In this article we will analyze the entire process - from installing components to optimizing the emulator. You will learn how to create a virtual device (AVD), select the appropriate version Android, speed up work via Hardware Acceleration and solve common problems. The instructions are relevant for the latest versions Android Studio Giraffe (2022.3.1) and newer, but the basic principles apply to earlier releases.
Preparing Android Studio to work with the emulator
Before creating a virtual device, make sure that your development environment is ready to work with the emulator. Android Studio comes built-in Android Emulator, but some components may be missing or require updating.
Open Android Studio and go to Tools โ SDK Manager. There are three key sections to check here:
- ๐ฆ SDK Platforms: Make sure that at least one version of Android is installed (recommended
Android 13 (Tiramisu)orAndroid 14 (Upside Down Cake)for testing modern applications). - ๐ฅ๏ธ SDK Tools: Check for checkmarks next to
Android Emulator,Android SDK Platform-ToolsandIntel x86 Emulator Accelerator (HAXM)(for processors Intel). - ๐ Updates: Update all components to the latest versions, if updates are available.
If you use a processor AMD, instead HAXM you will need to enable Windows Hypervisor Platform (for Windows 10/11) or configure KVM (for Linux). chips AMD see the official documentation.
โ ๏ธ Attention: On macOS with chips Apple Silicon (M1/M2) emulatorx86is not supported. Use images forARM64or configureRosetta 2to runx86emulators.
Creating a virtual device (AVD) in Android Studio
When all components are installed, you can start creating a virtual device:
- Open
Tools โ Device Manager(or click on the iconDevice Managerin the toolbar). - Click
Create Device(in older versions -Create Virtual Device). - Select a device category (for example,
PhoneorTablet) and a specific model (for example,Pixel 7 Pro). - Click
Nextand select the system image (System Image). For testing modern applications, it is recommendedAndroid 14 (API 34)with architecturex86_64orARM64. - Configure the device parameters (name, orientation, camera, memory) and complete creation.
If the required system image is not in the list, return to SDK Manager and download it from section SDK Platforms. Images marked Google Play include services Google (for example, Play Market), but take up more space.
The latest version of Android Studio has been installed|
At least one System Image has been downloaded|
Virtualization is enabled in BIOS (VT-x/AMD-V)|
At least 4 GB of RAM have been allocated for the emulator|
Other resource-intensive applications are disabled -->
Setting up emulator acceleration (Hardware Acceleration)
The emulator Android can work extremely slowly without hardware acceleration. To enable it:
- ๐ช On Windows: Activate
Windows Hypervisor PlatformiVirtual Machine PlatforminControl Panel โ apps โ Turn Windows components on or off. - ๐ง On Linux: Install
KVMand add the user to the groupkvm:sudo apt install qemu-kvm libvirt-daemon-system libvirt-clients bridge-utilssudo adduser $USER kvm - ๐ On macOS: Make sure that
System settings โ Privacy and securityis allowed to useRosetta(forx86emulators).
After setting, restart Android Studio and check that in the emulator settings (Settings โ Emulator) is selected Hardware - GLES 2.0 for the graphics accelerator.
โ ๏ธ Attention: If the emulator is still slow, reduce the screen resolution of the virtual device or allocate more RAM in the AVD settings (but not more than 50% of the physical RAM of your PC).
For maximum performance, use images x86_64 instead of ARM โthey work faster on most PCs, even if real devices use ARMprocessors.
Launch the emulator and basic setup
After creating the AVD, launch the emulator via Device Manager (button Play next to the device) or from the project launch window (Run โ Run'app'). The first launch may take several minutes - the emulator unpacks the system image and sets up the virtual environment.
After loading, you will see a standard screen Androidas on a real device. Here you can:
- ๐ฑ Test applications by installing them via Android Studio or dragging
.apkfiles into the emulator window. - ๐ Use the Internet (the emulator uses the host machine connection).
- ๐ท Simulate screen rotation (
Ctrl + F11/Ctrl + F12), calls, SMS and geolocation through the emulator toolbar.
For convenience, add the emulator to your favorites Device Manager โthis will speed up access to it in the future. It is also useful to set Snapshot (snapshot) to save progress between sessions.
| Keyboard shortcut | Action in the emulator |
|---|---|
Esc |
Return to home screen |
Ctrl + F11/Ctrl + F12 |
Rotate screen (portrait/album) |
F8 |
Switch network (Wi-Fi/mobile data) |
Ctrl + F10 |
Emulate pressing the power button |
Solving typical problems with the emulator
Even with proper configuration, the emulator may generate errors. Here are the most common cases and their solutions:
- โ "Emulator: ERROR: x86 emulation currently requires hardware acceleration"
Check whether virtualization is enabled in the BIOS (
VT-xfor Intel,AMD-Vfor AMD). On Windows also make sure that it is installedIntel HAXM(for Intel) or configuredHyper-V. - โ "PANIC: Missing emulator engine app"
Reinstall
Android EmulatorviaSDK Managerand make sure that the path to the SDK does not contain Cyrillic characters. - โ Emulator does not connect to the Internet
Check the proxy settings in Android Studio (
File โ Settings โ Appearance & Behavior โ System Settings โ HTTP Proxy) or restart the emulator with the flag-dns-server 8.8.8.8.
If the emulator freezes at startup, try:
- Delete and re-create the virtual device.
- Clear the emulator cache (
~/.android/avdon Linux/macOS or%USERPROFILE%\.android\avdon Windows). - Run the emulator from the command line with logs for diagnostics:
emulator -avd Your_AVD_Name -logcat *:e
How to check support virtualization?
On Windows open Task Manager โ Performance โ CPU and check the line "Virtualization". On Linux/macOS run the command:
egrep -c'(vmx|svm)' /proc/cpuinfo
Result 0 means that virtualization is disabled in the BIOS.
Optimizing emulator performance
The emulator can consume significant PC resources, especially when working with ARM-images or high screen resolution. To speed it up:
- โก Use
x86_64-images instead ofARM(they work faster on most PCs). - โก Reduce the AVD screen resolution (for example, select
720pinstead of1080p). - โก Disable animation in the emulator developer settings (
Settings โ Developer options โ Window animation scale โ Off). - โก Allocate to the emulator no more than 75% of the physical processor cores (in the AVD settings).
For macOS with chips Apple Silicon it is recommended to use images ARM64 - they work faster than x86 via Rosetta. On Windows s WSL 2 you can run the emulator inside the Linux subsystem for better performance.
The emulator on x86_64 with hardware acceleration works 2-3 times faster than on ARM, but does not support some native libraries (for example, for games).
Alternatives to the built-in emulator Android Studio
If the standard emulator is not satisfactory in terms of performance or functionality, consider alternatives:
| Tool | Pros | Cons |
|---|---|---|
| Genymotion | High speed, ready-made device configurations, cloud access | Paid license for commercial use |
| BlueStacks | Optimized for games, simple interface | Not suitable for debugging via Android Studio |
| Real Device (ADB) | Maximum testing accuracy | Requires a physical device and configuration USB Debugging |
For professional development, it is better to combine the built-in emulator (for basic tests) and real devices (for final testing). Cloud services like Firebase Test Lab or BrowserStack are also useful for testing on different versions Android without purchasing devices.
FAQ: Frequently asked questions about the Android Studio emulator
Is it possible to run the emulator without Android Studio?
Yes, the emulator can be launched from the command line. To do this, use the command:
emulator -avd Your_AVD_Name -netdelay none -netspeed full
The full list of flags is available in the documentation Android Developers.
Why canโt the emulator see the Internet?
The problem may be related to the proxy, VPN or firewall settings. Try:
- Disable VPN/proxy on the host machine.
- Run the emulator with an explicit DNS indication:
emulator -avd Your_AVD_Name -dns-server 8.8.8.8,8.8.4.4 - Check whether the antivirus is blocking the emulator connection.
How to transfer data between the emulator and PC?
Files can be dragged into the emulator window (for Android 7.0+) or used adb:
- From PC to emulator:
adb push local_path /sdcard/Download/ - From emulator to PC:
adb pull /sdcard/Download/remote_file local_path
How to emulate a call or SMS?
In the emulator toolbar (on the right) there is a tab Phonewhere you can:
- Simulate an incoming/outgoing call.
- Send SMS to the emulated device.
- Change the network or battery signal level.
Is it possible to run the emulator on a weak PC?
Yes, but optimization will be required:
- Use the image
Android 4.4 (KitKat)or5.0 (Lollipop)โthey are less demanding. - Reduce the screen resolution to
480p. - Disable hardware acceleration (but this will greatly slow down the work).
- Allocate no more than 1 GB of RAM for emulator.
It is also suitable for testing simple applications BlueStacks in mode Lite.