Building and testing Android apps on your PC can greatly boost your productivity. First up though, you need to setup a virtualized Android environment on your PC and that’s basically what we’re going to cover in this tutorial.
Since Android is an open-source project, its core source code is accessible to anyone via the Android Open Source Project (AOSP). This is basically what you need to emulate Android on a PC.
Let’s begin by going over the basic requirements needed to emulate Android on Windows.
- A Windows Machine: You obviously need a computer running any Windows version newer than XP.
- Java: You also need to have Java installed on your machine as it is needed by the SDK bundle to work. Install the latest version of Java for your system.
You also need the latest version of Android SDK. Download the zip file and extract to a folder. You will see a folder called ‘adt-bundle-windows-x86_64-20140321’. (I’m using Windows 8 on a 64-bit machine). Inside this folder there are two other folders named ‘eclipse’ and ‘sdk’, as well as an executable file called ‘SDK Manager’.
Click on ‘SDK Manager’ so that the SDK Manager window opens. This is where you can select and install the sub-packages you need. Select the Android version you want to virtualize and then click on the (>) button beside your chosen Android version.
Note: For this tutorial, we only need three sub-packages:
- SDK Platform
- ARM EABI v7a System Image
- Google APIs
Install the packages by clicking ‘Install Packages’.
Creating The Android Virtual Device (AVD)
It’s now time to try out a virtual Android device.
- In the SDK Manager window, browse to Tools > Manage AVDs. This should open the Android Virtual Device Manager.
When you click on the New button, a new window will open with ‘Create new Android Virtual Device (AVD)’. Configure the AVD as per these details:
|AVD Name:||AVD 1|
|Device:||Galaxy Nexus 7 (2012) (7″, 800 x 1280: tvdpi)|
|Target:||Android 4.2.2 – API Level 19|
|Memory Options – RAM:||768|
|Memory Options – VM Heap:||32|
|Internal Storage:||200 MiB|
|SD Card – Size:||500 MiB|
|Emulation Options- Snapshot:||Unchecked|
|Emulation Options – Use Host GPU:||Unchecked|
You should now be able to view your new Android device in the list of existing Android devices in AVD Manager. You can now go ahead and start it: in the same AVD Manager window, select your new device and click Start…
Here is what it should look like after it has fully started.
And there you have it. Feel free to click around and get a feel of the virtual Android interface on your machine.