Developing mobile applications for the platform Android is impossible without a high-quality testing tool, and it Android Emulator becomes a central element of the developer's workflow. Unlike real physical devices, a virtual machine allows you to instantly switch between dozens of configurations, test the interface at different screen resolutions and test specific functions such as GPS or accelerometer, without the need to keep a fleet of gadgets at hand.
The process of activating the simulator may seem confusing to beginners due to the abundance of settings and dependencies, but with the right approach it takes only a few minutes. Virtual device (AVD) works as a full-fledged computer inside your computer, emulating the processor architecture and system calls, which requires certain resources from the host machine.
In this article, we will look in detail at how to enable the emulator in Android Studio, consider the nuances of setting up profiles and ways to solve common compatibility problems so that you can focus on code, and not on searching for a launch button.
Preparing the environment and checking SDK components
Before trying to launch a virtual device, you need to make sure that all the necessary components are installed in the development environment. Users often forget that itself Android Studio is only an IDE, and the emulator is a separate module that needs to be loaded through the package manager.
Open the project settings and go to the Tools โ SDK Managersection. Here, on the tab SDK Tools, you should find the item Android Emulator. If the checkbox next to it is not checked, be sure to check it and click the apply changes button to load the emulator binary files.
Having up-to-date system images is also critical. Go to the SDK Platforms tab and make sure that the system image is loaded for the API version you need (for example, Android 14.0 (API 34)). Without installed System Image the emulator will have nothing to run on, and the start button will remain inactive.
- ๐ฆ Make sure that the Android Emulator component is installed in SDK Tools.
- ๐พ Check the availability of System Image for the target version of Android.
- ๐ Install Google Play Services plugin if access to the application store is required.
- โ๏ธ Update Android SDK Platform-Tools to the latest version.
It is worth considering that SDK components can be updated regardless of the version of the IDE itself.
โ ๏ธ Attention: After updating Android Studio, always double-check the presence of all necessary components in SDK Manager, since new versions of the development environment may require more recent versions of the emulator to work correctly.
Creating and configuring an AVD Manager profile
The central tool for managing virtual machines is AVD Manager (Android Virtual Device Manager). This is where a profile is created that determines the hardware and software of your future device. To enter this section, use the menu Tools โ Device Manager or click the corresponding icon in the top toolbar.
When creating a new device (Create Virtual Device), you will be asked to select a physical prototype. You can choose any from the list: from Pixel 6 to tablets or even Android TV. The choice of model affects the screen resolution, pixel density (DPI) and the presence of physical buttons, but does not limit you to only these characteristics.
The next step is to select a system image. Here it is important to pay attention to the column API Level and the type of architecture. For most modern computers with Intel or AMD processors, the optimal choice would be an image marked Recommended and architecture x86_64 or x86, as they provide the best performance thanks to hardware virtualization.
At the configuration stage (screen Verify Configuration) you can configure the parameters in detail:
- ๐ฑ Change the device name for ease of identification.
- ๐พ Allocate the amount of random access memory (RAM) for the virtual machine.
- ๐ Set the screen orientation and resolution.
- ๐ฎ Set up emulation of cameras and sensors.
Particular attention should be paid to the parameter Internal Storage i SD Card. If your application works with large amounts of data (cache, media files), it makes sense to increase these default values โโto avoid memory overflow errors during testing.
Launch the emulator and select the graphics mode
After creating a profile, a new entry will appear in the list of devices. To turn on the emulator, click the Play (triangle) button in the action column. The startup may take some time, especially at the first start, when the system creates a snapshot and initializes the virtual environment.
The most important parameter that affects the speed and stability is the graphics rendering mode. In the emulator settings (gear next to the start button) in the Emulated Performance โ Graphics section, you can select one of the options. The default is Automatic, which is usually the best choice, but if you have problems you can switch to Software or ANGLE.
If you are using Windows, make sure virtualization support is enabled. Checking the status is available through the menu Help โ Edit Custom VM Options or in the emulator settings. Lack of hardware acceleration can result in extremely low frame rates (FPS) or complete startup failure.
โ๏ธ Pre-launch check
It is also possible to run the emulator from the command line, which is useful for automating tests. The command looks like this:
emulator -avd Your_Device_Name -gpu host
Parameter -gpu host causes the emulator to use the GPU of your physical computer to render the interface, which significantly speeds up graphics-intensive applications.
Use Quick Boot and save state
Modern versions of the emulator support a function Quick Bootthat allows you to save the state of the virtual device when turned off. This means that the next time you start the system, the system will not go through the full Android boot procedure, but will instantly recover from sleep, saving you time.
By default, this function is activated. When you press the close button of the emulator window, it does not turn off completely, but goes into sleep mode. To perform a full reboot (cold start), you need to click on the arrow next to the close button and select Stop, and then start the device again.
Status management is also available through the advanced settings menu (three dots in the emulator control panel). Here you can create a manually saved point (Snapshot), to which you can roll back at any time if during testing the system begins to work unstable.
- โฑ๏ธ Quick Boot reduces startup time from 30-40 seconds to 2-3 seconds.
- ๐พ Snapshots are saved open applications and memory status.
- ๐ A full reset (Wipe Data) clears all user data.
- ๐ Disabling Quick Boot is required to test the OS loading process.
What to do if the emulator freezes when loading?
If you see Android logo for more than 5 minutes, try Wipe Data via AVD Manager. If this does not help, check if the antivirus is blocking the qemu-system-x86_64 process, and make sure that there is enough free space on the system disk.
Advanced settings and emulation of device functions
An emulator is not just a screen with Android, it is a powerful tool for simulating various usage scenarios. The advanced settings panel (a button with three dots) provides access to virtual sensors that are difficult to reproduce on a real device without special software.
In the section Location you can upload GPX files with tracks or set coordinates manually, which is indispensable when testing navigation applications or delivery services. The section Network allows you to emulate various communication conditions: from fast Wi-Fi to slow 2G or complete loss of signal, which helps test the application's resistance to connection interruptions.
For developers of games and multimedia applications, the settings Camera and Microphoneare interesting. The emulator allows you to broadcast an image from a computer's webcam or use a pre-recorded video, simulating a video call. Multi-touch input emulation is also available if your laptop supports a touch screen.
| Function | Description | Where to find |
|---|---|---|
| Fingerprint | Fingerprint scanner emulation | Extended Controls โ Fingerprint |
| Battery | Charge level and network status | Extended Controls โ Battery |
| Phone | Incoming calls and SMS | Extended Controls โ Phone |
| Virtual Sensors | Tilt, accelerometer, compass | Extended Controls โ Location/Sensors |
| Record & Playback | Recording actions and playback | Extended Controls โ Record & Playback |
โ ๏ธ Attention: GPS emulation via GPX files only works while the emulator window is open. After closing the simulator, the coordinates are reset if no explicit state saving was made.
Typical errors and methods for eliminating them
Despite the streamlined process, users often encounter errors when starting up. One of the most common is ERR_ANDROID_EMU_GPU_CONFIG or messages about the inability to open the device. This almost always indicates a video card driver conflict or lack of OpenGL support.
In such cases, switching the rendering mode to Software (in the AVD settings) or updating the graphics adapter drivers helps. If you're using Windows, it's also worth checking to see if there's a conflicting hypervisor enabled, such as the old VirtualBox, which might be blocking access to VT-x.
Another common problem is low disk space. Emulators take up a significant amount of space (from 2 to 10 GB each). If the system disk is full, the virtual machine may not start or may run extremely slowly. Regularly delete old AVDs or clear the cache via Device Manager.
To speed up the emulator on weak PCs, disable animations in the Android settings (Developer Options โ Window animation scale โ 0.5x) and use system images without Google Play if they are not needed for testing.
If the emulator starts, but the application inside it crashes with an error INSTALL_FAILED_NO_MATCHING_ABIS, this means that you are trying to run a native library (for example, a .so file for ARM) on an emulator with x86 architecture. Solution: either install a system image with support for ARM translation, or build a universal APK (Universal APK).
90% of problems with running the emulator can be solved by updating video card drivers, enabling virtualization in the BIOS, or clearing space on the system disk.
Optimizing performance and working with multiple devices
Professional development often requires simultaneous testing on several devices. Android Studio allows you to run as many instances of the emulator as you want in parallel, the only limit being the amount of RAM on your computer. Each device will work in a separate window.
To save resources, you can use a โcoldโ start for rarely used profiles and keep the main working devices in sleep mode. It is also possible to run the emulator in the background without a graphical interface (headless mode), which is convenient for running autotests on continuous integration (CI/CD) servers.
The command to run without a GUI looks like this:
emulator -avd Device_Name -no-window -no-audio
This can significantly reduce the load on the CPU and GPU, since the system does not need to render the image. However, this mode is not suitable for debugging the interface. Remember that emulation is a resource-intensive process, and running several heavy profiles (for example, Android 14 with Google Play) on a machine with 8 GB RAM can lead to a significant slowdown of the entire system.
- ๐ Use an SSD drive to store emulator images (by default it is there).
- ๐งน Wipe Data regularly for old ones profiles to free up space.
- ๐ Reduce the number of running emulator processes when there is not enough RAM.
- ๐ง Set the environment variable
ANDROID_EMULATOR_LAUNCHERfor customization.
FAQ: Frequently asked questions questions
Is it possible to run the Android Studio emulator on a Linux computer?
Yes, the emulator is fully supported on Linux. However, to speed up the work (KVM), additional steps may be required to configure access rights /dev/kvm and install emulation packages, since Linux does not have an analogue of Intel HAXM used in Windows.
Why is the emulator running slowly, although I have a powerful PC?
Most likely, hardware virtualization is not enabled (VT-x/AMD-V) in the BIOS, or the emulator uses Software Rendering. Check the AVD settings and make sure that the graphics mode is selected Automatic or Hardware.
How to transfer a file (APK or photo) inside the emulator?
The easiest way is to drag the file with the mouse directly onto the window of the running emulator. APK files will be installed automatically, and media files will be placed in the /sdcard/Downloadfolder. You can also use the command adb push.
Where are the emulator files stored on disk?
By default, the data is stored in a hidden user folder. On Windows it is %USERPROFILE%\.android\avd, on macOS and Linux - ~/.android/avd. There are configuration files (.ini) and data disks (.qcow2 or .raw).
Is it possible to run the emulator without Android Studio?
Yes, if you have Android SDK installed and environment variables configured, you can run the emulator directly through the command line using the command emulator with the appropriate flags, without launching a heavy IDE.