Chapter 工欲善其事 its prerequisite-android SDK tools (3)

Source: Internet
Author: User
Tags home screen

1.3 No real machine development--android simulator

At some point, we may not have the required Android devices on hand, so is it helpless to debug or develop? Of course not. Because we have an Android simulator!

Here, let's start by introducing the emulator that comes with the Android SDK.

The Android emulator is a mobile device emulator that comes with the Android SDK, a virtual device that can run on your computer, simulating typical functions and behaviors on all mobile devices except for answering and making calls. It allows you to simply preview, develop and test Android apps without having to use a physical device.

We've already covered how to install the Android SDK, and now we're going to install the simulator to test Android. Select "Virtual Devices" on the left navigation menu and click on the "New" button on the right. Then pop the Create box, enter the name of the simulator, and select the desired Android version from the drop-down menu, this will only show the Android version selected at the time of installation, enter the SD card size, this is just a virtual SD card, is actually to save your settings and files to an IMG file. Then, select the screen size, display by default, and when the settings are complete, click the Create AVD button.


Figure 1-14 Creating an AVD

The program may pause while creating the AVD, wait for the confirmation window to appear, and here our simulator is built. Now it's ready to run Android on your computer. Select the virtual Android you created and click on the "Start" button on the right.


Figure 1-15 Starting the AVD

If you need a larger screen, you can select the Scale option and click "Launch" to start.


Figure 1-16 Choosing the simulator scale

The emulator starts loading Android. Several command prompt windows may be opened, and then you can see the emulator itself. Note By default, the virtual button and keyboard are displayed on the right side of the emulator. Android may take several minutes to load, especially if the first boot is slow. Wait a moment, the splash screen will switch to the Android splash screen. Finally, you'll see the home screen of Android and use your mouse to do it normally, but you don't have to double-click to open the app.


Figure 1-17 Simulator interface

Here, by the way, the concept and the difference between the simulator and the virtual machine are added.

Simulator (Emulator): Mainly through the software simulation hardware processor function and instruction system program, so that the computer or other multimedia platforms (such as handheld computers, mobile phones) can run software on other platforms.

Virtual Machine (Virtualmachine): An abstract, virtual machine is added between the machine and the compiler, and this virtual machine provides a common interface to the compiler on any platform. The compiler only needs to target the virtual machine, generate code that the virtual machine understands, and then the interpreter translates the virtual machine code into the machine code that the particular system can execute.

Experience Sharing:

Using simulator development, the speed is relatively slow, the development efficiency is comparatively low. So if the conditions allow, or the use of real machine debugging is better.

Android simulators are much slower than iOS and WP7 simulators for many reasons, the most important of which is that the Android emulator simulates the ARM architecture (ARM-EABI) environment. Google's Open source project, Android-x86, has ported Android to the x86 platform, and the corresponding x86 version of the simulator is also available to developers. Specifically how to use this is no longer explained in detail, please have the necessary reader reference on the network tutorial to configure. In particular, the x86 version of the simulator is very fast, but there are many hardware-related APIs that are not well supported. This is also important to note if you are using it during the development process.


Chapter 工欲善其事 its prerequisite-android SDK tools (3)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.