The first line of code: Android Reading Notes-1th Chapter Android System

Source: Internet
Author: User

(i) Android system architecture

1, the Linux kernel layer: A variety of low-level drivers, such as display drivers, audio drivers, power management and so on.

2, the system run the Library layer: a variety of library support, such as 3D drawing, browser kernel, database and so on.

3. Application Framework Layer: Various APIs, various manager.

4. Application layer: all applications.

 (ii) Android system-level features

1, four components: Activity,service,broadcast,content Provider.

2, System control: For writing interface, you can also customize the interface.

3, SQLite database: A lightweight, fast embedded relational database.

4, location positioning: Built-in GPS, based on it can develop LBS applications.

5, Multimedia: Audio, video, recording, photo, video and so on.

6, Sensor: Acceleration sensor, direction sensor.

(iii) Build an Android development environment

1. Prepare the required software:

(1) Android SDK

(2) Compiler: Eclipse

(3) ADT: a plugin for eclipse

PS: A complete set of tools Baidu Network storage address: Http://pan.baidu.com/s/1jI6fmjO

2. Create a phone simulator: faster with ARM architecture.
PS: When the simulator is faulty, restart the ADB test (in Ddms), and then restart Eclipse

  (iv) Project file structure in eclipse

1. SRC: Where all Java code is placed

2, Gen: The contents of this directory are automatically generated, there is a R.java file, do not try to modify it manually!

In Java code: R.XX.XX Query
In the XML file: @xx/xx Query
Like what:
R.string.hello_world
@string/hello_world

3, Assets: Store some files packaged with the program

4, Bin: contains some files generated automatically at compile time, there will be an apk file, can be installed directly on the phone.

5. Libs: Contains third party jar package

6, Res: pictures, layouts, strings and other resources

7, Androidmanifest.xml: Project configuration file, all four components used in the need to register here. You can also add permission declarations, set versions, and so on.

8. Project.Properties: Only one line of code, specifies the version of the SDK to use when compiling the program.

(v) Resources in the Android project (res directory)

1. Folders starting with drawable: storing pictures.
PS: The project's icon file is specified in the Androidmanifest.xml file by the following code: android:icon= "@drawable/ic_launcher"

2. Folders starting with values: storing strings

3. Layout folder: Store layouts file

4. Menu folder: Store menus file

(vi) Log tool Android.util.Log

1, LOG.V (): Print trivial log information

2, LOG.D (): Print debugging information

3, LOG.I (): Print more important data

4. LOG.W (): Print warning message

5. LOG.E (): Print error message

The first line of code: Android Reading Notes-1th Chapter Android System

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.