Android now offers x86 emulator support. Using an x86 emulator can speed up development considerably. This article shows how to install and configure an x86 emulator.
Android added x86 emulator support at the time of the incorporation of the r17 platform tools. The x86 processor architecture has traditionally been used in desktop and laptop computers. However, low power and low cost ARM architectures are more common on mobile devices. Using an x86 emulator is much faster than the ARM-based emulators that are often used when doing Android development. Xamarin.Android fully supports the use of an x86 emulator. This document describes how to install and set up an x86 emulator for use with Xamarin.Android.
Installation and Setup
1. In the Android SDK Manager, select Intel Atom x86 System Image by Intel Corporation under API 10, and Intel Hardware Accelerated Execution Manager under Extras, as shown below.
- For the Android 4.0.3 (API 15) x86 emulator, select Intel Atom x86 System Image by Intel Corporation under API 15, as shown below:
2. Click Install Packages to install selected packages.
3. Run the
IntelHAXM.exe on Windows)
installer, located in the Android SDK folder under
IntelHAXM is available at Configuring Virtual Machine Acceleration.
4. Open the AVD Manager and create an x86 virtual device, as shown below for API Level 10:
- To create an x86 virtual device for API level 15, both the Target and ABI need to be set. Select Android 4.0.3 – API Level 15for the Target and Intel Atom (x86) in the CPU/ABI dropdown, as shown below:
- GPU emulation is also optionally available. To enable emulation, select New in the Hardware section, and then choose GPU Emulation in the dropdown of the dialog that is displayed. Then click OK to close the dialog. Add the property as shown:
- This will add the property, but the value will be set to false. Click the property in the grid under the Hardware section, and then change it to true as shown:
5. If using Xamarin Studio, set the project to support x86 by selecting the x86 checkbox under Options > Build > Android Build > Advanced, as shown below:
6. If using Visual Studio, set the project to support x86 by selecting the x86 checkbox under Project > Properties > Application > Supported Architectures, as shown below:
7. Run the application as normal, selecting the x86 emulator image you just created.
In this article, we covered how to download and install x86 emulator support for Android, as well as how to configure a Xamarin.Android application to use an x86 emulator.