Android system architecture and Android Studio development environment installation

Android development foundation

Introduction to Android

Android (Android) is an operating system, and its LOGO is like this
Insert picture description here

The LOGO was designed by former Google designer Lrina Blok from the male and female icons on the toilet door.

Android is a free and open source operating system based on Linux and like Linux

The Android operating system was originally developed by Andy Rubin (Andy Rubin), and was acquired by Google in 2005, and the Open Mobile Alliance was formed to develop and improve.
This operating system is mainly used in smartphones, tablets, wearable devices and cars.

Android basic architecture

Android system architecture
As shown in the figure, the Android system architecture is divided into five layers: Linux kernel layer, hardware abstraction layer, system runtime library layer, application framework layer, application program layer

Linux kernel layer

The Android core system service is based on the Linux kernel. With the help of the Linux kernel service, it implements hardware device drivers such as display driver, camera driver, Bluetooth driver and other underlying hardware drivers, as well as process and memory management, network protocol stack, power management, wireless communication and other core functions . The Dalvik virtual machine relies on the threading mechanism of the Linux kernel and the underlying memory management mechanism functions.
In fact, not all device drivers in the Android system are placed in the Linux kernel. Some of them are implemented in the user space. The main reason for this is to avoid Linux. According to the GPL agreement, if you want to run Android on other hardware, just run this part of the code.

Hardware abstraction layer

Show hardware device capabilities to higher-level application development frameworks. This layer contains multiple library modules, each of which implements an interface for a specific type of hardware, such as a camera or Bluetooth module. When the framework API requires access to the device hardware, the Android system will load the library module for the hardware component

System runtime layer

This layer is divided into two parts, system library, Android runtime

The system library (C/C++ library) is used to connect the application framework layer and the Linux kernel layer. This library will be used by the components of the application framework layer to provide development services

The Android runtime contains two parts: the core library and the Dalvik virtual machine. The
core library provides most of the functions in the Java API, and also contains some core APIs of the Android system, such as android.os, android.net, android.media, etc., which can allow development People use Java language to write Android applications. Because Java language has cross-platform characteristics, Android applications developed by Java language can run on any device with Android system without compiling
. There is a proprietary process, and each process is composed of many activities. Activities are more flexible than processes. They switch between multiple states. The Dalvik virtual machine is not a traditional stack-based virtual machine, but a register-based Java virtual machine that optimizes the use of memory resources for CPU and memory. In the Android system, multiple programs are not running on a Dalvik virtual machine. However, each Android application has a unique Dalivik virtual machine instance (sandbox mechanism) and runs in this instance. This layer is written in Java language

Application framework layer

The application framework layer is the foundation of Android application development. Many applications can realize core functions at this layer, and at the same time realize function expansion through inheritance, because this layer contains components required for application development such as:
Window Manager: Management window program
Content Providers (content provider): allows different applications to access or share data
Notification Manager (notification manager): enable applications to display custom prompts in the status bar and many other rich development components.
This layer is composed of Written in Java language

Application layer

Applications on the Android system, such as a newly purchased mobile phone, will always have applications such as a gallery, web browser, SMS address book, etc. They are all written in Java language and can be replaced by other applications written by developers, making the Android system more flexible and free

Build an Android application development environment

Android studio is an official integrated development environment, a flexible compilation system, fast, unified (applicable to all Android devices), rich in features, and contains a large number of testing tools and frameworks.
Android studio supports Windows, MacOS, Linux and other platforms. This experiment only involves building on Win10

Open the link of Android studio official website:
https://developer.android.google.cn/studio/install and
Insert picture description heredownload directly, the official website will automatically detect the current operating system and automatically select the corresponding version

After downloading, open the installer.

Select the installation path. Next,
select the installation component and

import the configuration information by default. Next , select the second OK to

pop up the proxy settings, just cancel it, and enter the welcome page.
welcome!
Select the installation method. The default

interface style is Next, and the Next

SDK configuration information is selected.

Check the SDK and select the installation path. Next SDK specific information. Finsh

lacks some components, which does not affect cancel. The

installation is complete!

Guess you like

Origin blog.csdn.net/weixin_52944095/article/details/114096630