03 Chapter Two Exercises

2-1 Briefly describe the development environment required for Android application development.

To develop Android applications, you need a suitable system environment. You can use Windows 8/7/Vista/2003, Mac OS X 10.8.5 or higher,
or Linux GNOME or KDE (K desktop environment). The minimum memory is 2G, and 4G is recommended. .
In terms of software, first need the support of JDK (JDK 7 is recommended) and Android SDK. After that, you need to prepare suitable development tools.
Eclipse is often used, but Android Studio can also be used for development. For Eclipse, the version number is required to be 3.6 or newer. For the specific version, select "Eclipse
IDE for Java Developers". In addition, you need to install the Android Development Tools plug-in (ADT plug-in for short) for Eclipse.

2-2 Briefly describe the role of ADT plug-ins.

Google has developed a plug-in specifically for Eclipse to assist development, and its name is Android Development Tools (ADT for short). After installing the ADT
plug-in, you can not only debug online, but also simulate various mobile phone events and analyze program performance.

2-3 How to use Android API help documents?

On the official Android website, the latest version of the official API documentation of the Android SDK is provided. The API document records a
large number of APIs in Android programming , mainly including class inheritance structure, member variables and member methods, construction methods, detailed instructions and description information of static members, etc.
After the Android SDK is successfully installed, you can open the index.html page to view it in the docs subdirectory of the Android SDK installation directory.
On this page, click the Develop hyperlink to enter the developer page. In this page, you can click the Training hyperlink to view the
development training documents provided by Android , which include the best exercises for learning Android project development; click API Guides hyperlinks, API provides a means to view Android
south, which includes theoretical knowledge of Android development project that must be mastered; click reference hyperlink to view the reference to the text provided by Android
files, including all of the Android API reference documentation, When using this API document, you need to select the package in which the
class is to be viewed , and then find the class to view the corresponding document.

2-4 What is an Android emulator, and which mobile device hardware features does the Android emulator support?

The Android emulator is a QEMU-based program that provides a virtual ARM mobile device that can run Android applications. It
runs a complete Android system stack at the kernel level , which contains a set of predefined applications (such as dialers) that can be accessed in custom applications. Open
developers to select the Android operating system version simulator defined by AVD, in addition can also customize the mobile device keyboard mapping and skin. When starting
and running the simulator, developers can use a variety of commands and options to control the behavior of the simulator.
The Android emulator supports the hardware features of a variety of mobile devices, such as:
 ARMv5 central processing unit and corresponding memory management unit (MMU);
 16-bit liquid crystal display;
 One or more keyboards (based on Qwerty keyboard and related Dpad/ Phone key);
 Sound card chip with output and input capabilities;
 Flash memory partition (simulated by the disk image file on the computer);
 Including a GSM modem that simulates a SIM card.

2-5 What are the main functions of the Android Debug Bridge?

Its main functions are as follows:
 Run the shell (command line) of the Android device;
 Manage the port mapping of the Android emulator or device;
 Upload or download files between the computer and the Android device;
 Install the local apk file to the Android simulation Device or device.

2-6 Briefly describe the function of DDMS and how to use it?

DDMS (Dalvik Debug Monitor Service) is the Dalvik virtual machine debugging supervision service of the Android development environment. It can monitor the
process and stack information in the Android system, view LogCat logs, screenshots, simulate phone calls and SMS messages, and manage emulator files Wait.
In Eclipse, select the "Window"/"Open Perspective"/DDMS menu item to open the DDMS perspective. In the device manager of the perspective
, all running processes in multiple simulators will be displayed. You can monitor multiple Android emulators at the same time. In addition, click the
camera button in the panel to capture the screen of the emulator; in the emulator controller, you can simulate various network conditions, simulate phone calls, SMS
communication, and Send virtual address coordinates (used to test GPS function), etc.; in the LogCat panel, log information will be displayed, which can quickly locate
errors generated by the application .

Guess you like

Origin blog.csdn.net/weixin_44522477/article/details/111851269