[ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
If you want to test the application on different versions of Android or different types of devices than you have physical devices for (or don’t want to use real devices for testing), you will need to configure emulators using the Android Virtual Device Manager.
In Android Studio 2.3, go to Tools → Android → AVD Manager to open the Android Virtual Device Manager. In Android Studio 2024, this is at Tools → Device Manager. Click on “Create Virtual Device” (or the ‘+’ icon) to add a new emulator. On the first page you will select the type and screen size of the device, e.g. small phone or large tablet, along with its pixel resolution.
On the next page choose which version of Android the emulator will run. The ABI determines what type of CPU the system will run on: “arm”, “arm64”, “x86”, or “x86_64”. In order for the emulator to run the ABI must match (or be compatible with) your computer’s host CPU; for example, an “arm” image will not run on an “x86_64” computer. (This means that you cannot test on Android 2.2 (Froyo) or earlier in emulation, since there are no x86 builds for those versions of Andriod.)
The system image list shows both the Android version (e.g. 6.0), code name (e.g. Marshmallow), and API level (e.g. 23). You should create at least enough emulators to cover the minimum and target SDK versions specified in ‘AndroidManifest.xml’, and ideally the latest release of Android and a few intermediate versions to make sure the app is compatible across a wide range of device ages. It is highly recommended to test against the following API’s, since the code has branches that follow different paths for each of these versions:
Testing the following API’s is suggested to ensure compatibility with new devices:
On the last page finalize the details of the virtual device. Give it a descriptive name which will distinguish it from other virtual devices; for example, include the type/size of the device and the Android version and/or API level. Under “Advanced Settings” you can configure the system’s CPU and memory usage.
To run the virtual device for testing, click on its play button in the device list. The emulated device should start up in a new window, acting as if it were powered on.
[ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This document was generated on March 30, 2025 using texi2html 5.0.