Android Learning 1 (about android)
Disclaimer: All content in the android learning file is sorted fromThe first line of code Android will not be repeated in the following article. Want to see the original can buy books to see, or go to the author's blog http://blog.csdn.net/guolin_blog? Viewmode = contents. It's a bit of water to write.
1. android system architecture
1. At the Linux kernel layer, the android system is based on the linux2.6 kernel.
2. System Runtime Library layer, which provides main features for the android system through some c/c ++ Libraries
3. Application Framework layer, which provides various APIs that may be used to build applications
4. Application Layer. All applications installed on mobile phones belong to this layer.
2. Four components of android: Activity, Service, BroadcastReceive broadcast receiver, and ContentProvider.
3. Create a helloworld android Application
Directory analysis:
Src: place all of our java code
Gen: This directory is automatically generated. There is mainly an R. java file. Any resource added to your project will generate a corresponding resource id. This file should never be modified manually.
Assets: stores files packaged with the program. When your program runs, you can dynamically read the content of these files. In addition, if your program uses the WebView function to load local webpages, all webpage-related files are stored in this directory.
Bin: It mainly contains some files automatically generated during compilation.
Libs: If your project uses third-party jar packages, you need to put these jar packages under the libs directory, the jar packages under this directory are automatically added to the build path.
Res: all the images, la S, strings, and other resources used are placed under this directory.
AndroidMainfest. xml: This is the configuration file of the android project. All the four components defined in the program must be registered in this file. In addition, you can add a permission statement to the application in this file, or rewrite the minimum compatible version and target version of the specified program during creation.
Project. properties: Specifies the SDK version used for compiling a program with a line of code.
4. Use the Log tool Log of Android
Log. v () is used to print the most trivial and least meaningful logs. Verbose is the lowest level in android logs.
Log. d () prints some debugging information, which helps debug Programs and analyze problems.
Log. I () is used to print some important data that you really want to see and can help you analyze user behavior. The corresponding level is info.
Log. w () prints the warning information, prompting that the program may have potential risks in this place. It is recommended to fix the issue. The corresponding level is war.
Log. e () is used to print the error information in the program. This generally indicates that your program has a serious problem and must be repaired as soon as possible. The corresponding level is error.
The log details are described in later articles.