Android system architecture and application directory structure analysis

Source: Internet
Author: User

First, Android system architecture

The Android system has a total of 4 layers from the bottom up and each layer encapsulates the underlying implementation and exposes the calling interface to the previous layer.

  1. Linux kernel (Linux Kernel)
    • Android runs on Linux kernel 2.6, but replaces the Linux-bound part of the GNU protocol so that Android programs can be used for commercial purposes.
    • The Linux kernel is the abstraction layer between the hardware and software layers.
  2. Middleware
    • Middleware includes two parts: Core Library and runtime (libraries & Android Runtime)
    • The core library includes the Surfacemanager Display System Management Library, which is responsible for displaying 2D or 3D content to the screen; Media Framework Library, which is responsible for supporting images, supporting the recording and playback of multiple video and audio; SQLite database, A powerful lightweight embedded relational database, WebKit browser engine, etc.
    • Dalvik virtual machines: Unlike Java virtual machines, each Android application runs in its own process and has a Dalvik virtual machine of its own, which allows the system to be optimized at runtime and significantly reduces the impact between programs. Instead of running Java bytecode, the Dalvik virtual machine runs its own bytecode.
  3. Application Framework (Application framework)
    • A rich and extensible view (views) that can be used to build applications, including lists (lists), grids (grids), TextBox (text boxes), buttons (buttons), and web browsers that can be embedded.
    • Content Providers enables an application to access data from another application, such as a contact database, or to share its own data.
    • The Resource Manager (Resource Manager) provides access to non-code resources, such as local strings, graphics, and layout files (layoutfiles).
    • The Notification Manager (Notification Manager) enables applications to display customized prompts in the status bar.
    • Activity Manager is used to manage the application lifecycle and to provide common navigation fallback functionality.
  4. Applications (applications)
    • Android system will include some application packages including email client, SMS short message program, calendar, map, browser, contact management program and so on. All applications are written in the Java language.
Second, Android application structure analysis

1. We see a R.java file under the Gen directory, the R file is automatically generated by ADT, and the programmer does not need to modify it, and the R file is responsible for invoking the non-code resources in the application.

    

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.