Android Learning One (learn Android)

Source: Internet
Author: User

1.android System Architecture

1.linux kernel layer, Android system is based on the linux2.6 kernel

2. The system runtime layer, which provides key feature support for Android systems through a number of C + + libraries

3. Apply the framework layer, which provides the various APIs that may be used to build the application

4. Application layer, all applications installed on the mobile phone belong to this layer

The four components of 2.android: Activity activities, service services, broadcastreceive broadcast receivers, contentprovider content providers.

3. Create a HelloWorld Android app

Directory Analysis:

SRC: Place where all our Java code is placed

Gen: This directory is automatically generated, there is a R.java file, and any resources added to your project will generate a corresponding resource ID in it. This file should never be manually modified.

Assets: You can store some files packaged with the program, you can read the contents of these files dynamically while your program is running. In addition, if you use the WebView to load the local Web page, all the pages related files are also stored in this directory.

Bin: It mainly contains some files that are generated automatically at compile time.

Libs: If you use a third-party jar package in your project, you will need to place the jar packages under the Libs directory, and the jar packages placed under this directory will be automatically added to the build path.

Res: All the used images, layouts, strings, etc. are placed under this directory

Androidmainfest.xml: This is the Android project configuration file, all four components defined in the program need to be registered in this file. You can also add a declaration of permissions to the application in this file, or you can override the specified minimum and target version of the program that you specified when you created it.

Project.Properties: A line of code that specifies the version of the SDK to use when compiling the program.

4. Log using the Android logging tool

LOG.V () This method is used to print the most trivial, least meaningful logs. Corresponding level verbose, is the lowest level of the Android log

LOG.D () prints Some debugging information that helps debug programs and analyze the problem corresponding level is the debug

LOG.I () is used to print some of the more important data that you would like to see that can help you analyze the behavior of the user, the corresponding level is info

LOG.W () print a warning message that the program may have a potential risk in this place, it is best to fix it, these warning places, the corresponding level of war

LOG.E () is used to print the error message in the program, which generally means that your program has a serious problem and must be repaired as soon as possible, the corresponding level is error

The details of the log are described in the following article.

Android Learning One (learn Android)

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.