Android Project structure and architecture

Source: Internet
Author: User

Learn Android platform people generally on the Android platform should have a little knowledge of the others is not much to say

Android projects typically consist of the following sections

Above is a simple Android project structure directory diagram

1. Src is primarily the source file directory where the business logic code is placed and the corresponding UI code

2. Gen below has a R.java folder that file is built for Android projects automatically generated by the file is read-only files can not be changed inside there are many static class names corresponding to res in the resource file one by one

Generally have attr, drawable ID Raw layout string XML specifically look at your project file

3. Assets can contain files used by the system such as some pictures MP3 video class files

4. Res resource file mainly has the following files

Drawable: We usually place some style XML and put some pictures.

Drawable-hdpi mainly put pictures of some high-resolution pixels

Drawable-l Place Some low-pixel images

Drawable-m placing a picture of a general pixel

Layout files are mostly placed

The menu is to place some XML menus-style files

==============================

Arrays.xml some array elements

Colors.xml values for some colors

Strings.xml Some strings

Styles.xml Style Files

Dimens.xml some pixel-sized files

=======================

Values-en-rus English Resource Document Package

VALUES-ZH-RCN Chinese resource file Package

The system will feel the system settings of the language application select the appropriate resource file for internationalization

The general profile of the Androidmanifest.xml Project records the various components, as well as the corresponding functions of the application, which can be configured with the appropriate service permissions and so on (later detailed)

defalut.properties primarily records Android's environmental information, such as Android version information

Simply talk about the Android architecture

This is the official Android drawing.

1. Applicaiton is the Android core application package with Android released together with the SMS call email calendar and so on later to everyone introduced the Android source of the application

2. Framework application frameworks, developers can access the API framework for application development such as

A rich and extensible view (views) that can be used to build applications, including lists (lists), grids (grids), text boxes (textboxes), buttons (buttons), and even web browsers that can be embedded.

* Content providers (Contentproviders) enable applications to access data from another application, such as a contact database, or share their own data

* Resource Manager (Resource Manager) provides access to non-code resources such as local strings, graphics, and layout files (layoutfiles).

* Notification Manager (Notification Manager) enables applications to display customized prompts in the status bar.

* Activity Manager is used to manage the application lifecycle and provide common navigation fallback functionality.

3. System Runtime Library

1) Program Library

Android contains a number of C + + libraries that can be used by different components of the Android system. They provide services to developers through the Android application framework. Here are some core libraries:

* System C Library-a standard C system function library (LIBC) inherited from BSD, which is specifically tailored for embeddedlinux-based devices.

* Media Library-based on Packetvideoopencore; the library supports a variety of commonly used audio, video format playback and recording, while supporting still image files. The encoding format includes MPEG4,H.264,MP3,AAC,AMR, JPG, PNG.

* Surface Manager-manages the display subsystem and provides seamless integration of 2D and 3D layers for multiple applications.

* Libwebcore-an up-to-date web browser engine with support for Android browser and an embeddable Web view.

* SGL-The underlying 2D graphics engine

* 3D Libraries-based on opengles1.0apis implementation, the library can use hardware 3D acceleration (if available) or use highly optimized 3D soft acceleration.

* FreeType-Bitmap (bitmap) and vector (vectors) font display.

* SQLite-A lightweight relational database engine that is available and powerful for all applications.

2) Android Runtime

Android includes a core library that provides most of the functionality of the Java programming language core library.

Each Android application runs in its own process and has a separate instance of the Dalvik virtual machine. Dalvik is designed as a device that can run multiple virtual systems at the same time and efficiently. Dalvik Virtual Machine Execution (. dex) Dalvik executable, which is optimized for small memory usage. While the virtual machine is a register-based, all classes are compiled by the Java compiler and then converted to. dex format by the DX tool in the SDK and executed by the virtual machine.

Dalvik virtual machines rely on some of the features of the Linux kernel, such as threading mechanisms and underlying memory management mechanisms.

4.Linux kernel

Android's core system services rely on the Linux 2.6 kernel, such as security, memory management, process management, network protocol stacks, and drive models. The Linux kernel also acts as an abstraction layer between the hardware and the software stack.

Android Project structure and architecture

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.