Biyernes, Enero 25, 2013

The Emulator


The Emulator

Running your application on a physical device versus an emulated device is pretty much
the same thing. That is because the emulator is an actual code emulator, meaning it
runs the same code base as the actual device, all the way down to the machine layer.
A simulator and an emulator sound very similar, but are fundamentally
different. To emulate means to imitate the machine executing the binary
code. So, an emulator is sort of like a virtual machine. A simulator merely
simulates the behavior of the code at a higher level. Android SDK ships
with a true emulator, based on QEMU.

To use the emulator, we’ll have to create an Android Virtual Device (AVD). The easiest
way to do that is to start the android tool via Eclipse.

To create a new AVD, start the tool called Android SDK and AVD Manager (see Fig-
  icon or via theure 3-3). You can start this tool from Eclipse by clicking on the
command line by starting the tool called android, which is located in your SDK/tools
directory.


From within the Android SDK and AVD Manager window, choosing “New…” pops
up a Create New AVD dialog window (see Figure 3-4). In this dialog, you specify the

parameters for your new AVD. The name can be any name you choose. The target
designates which version of Android you want installed on this particular AVD. The
list of possible targets is based on platforms and add-ons that you have installed into
your SDK. If you don’t have any targets, go back to the Android SDK and AVD Manager
window and choose the “Available packages” tab to install at least one platform, for
example, Android 2.3 - API level 9.
Each AVD can have an SD card. You can just specify a number here for your built-in
card, in megabytes. The skin is the look and feel of your device as well as its form factor.
The Hardware option lets you fine-tune what this AVD does and doesn’t support.

Walang komento:

Mag-post ng isang Komento