System Architecture Analysis

Android Architecture

Android structure has four layers and five parts. Android is divided into four layers:

The application layer(Applications), application framework layer(Application Framework), system operation layer(Libraries and Android Runtime)andLinuxThe kernel layer.

So what’s in the application layer? It’s a bunch of applications, like home page, contacts, phone, browser, etc.; How to understand the application framework?

The application framework layer is written in Java, with event manager, Windows manager, content provider, viewing system, message manager, installation package management, phone management, resource management, location management and so on;

What is in the Libraries?

SQLite, Webkit, SQL, SSL, etc., for the function library layer, in C language and C ++ written, Android Runtime is? It has the core library and the Dalvik virtual machine. Next is the Linux layer, which has: display driver, camera driver, Bluetooth driver, sound driver, wifi driver, keyboard driver, so many drivers, very important.

So what are we to make of it? The application has some impression and understanding of the above description.

Understanding of Android architecture:

Libraries: This layer will inform the management of the Application Framework. Libraries: This layer will inform the management of the required Libraries. Android Runtime is a virtual machine, as you can see from Android Studio. The Linux kernel is the driver, and we call the system driver to implement the function.


ApplicationApplication layer:

It is in this layer that we typically say app applications are developed, using the Java language

Application FrameworkApplication Framework layer:

We write app, need this layer for management, there are event manager, Windows manager, content provision, viewing system, message manager, installation package management, phone management, resource management, location management and so on

LibrariesThe class library +Android Runtime(Android runtime environment) :

Android provides a set of C/C++ libraries, including interface management, media framework, SQLite, Webkit, SQL, SSL, etc. Android Runtime consists of the core library and the Dalvik virtual organization

LinuxThe kernel

** Involves the bottom layer, ** such as: display driver, camera driver, Bluetooth driver, voice driver, wifi driver and so on

Environment set up

The general Android environment has:

  1. Eclipse+ADT+ SDK
  2. Android Studio + SDK
  3. IntelliJ IDEA + SDK

However, AndroidStudio + SDK is now used

Android Studio3.0 download and installation details plus Eclipse download installation configuration JDK9

JDK installation and configuration

  1. downloadJDK
  2. JDKThe installation of
  3. Configuration of environment variables

First click Accept, Accept…. Then select your computer configuration and click Download and install

Next, I’ll cover JDK configuration with what I’ve written before

After installing the JDK package, you need to configure environment variables. Click “My computer” or “This Computer” on the desktop, select “Properties”, then select “Advanced”, and click “Environment variables” in it to pop up the “Environment Variables” dialog box, which contains “user variables” and “system variables” two parts.

Set “variable name” to “JAVA_HOME” and” variable value “to” C:\ProgramFiles\Java\jre1.8.0_112″, which is the JDK installation path. You can also directly copy the path from the address bar.

Select “Path” from the “System Variables” list again (double click) –>” Edit “, the “Edit System Variables” will pop up, click New:

Then, click the “New” button under “System Variables” to create an environment variable named “classpath” with a value of “.”, which represents the current path.

Verify that the configuration is successful

Open CMD, win +R, and enter CMD to enter Javac and Java respectively. If the following figure is displayed, the configuration is successful.

Related terms

  • **ADT: ** Android development tool
  • **SDK: ** Software development kit

downloadAndroid Studio

Go to the Android Studio website first

Developer. The android. Google. Cn/studio/inde…

General effect as shown in the picture

Click on the platform you want

Next, I will provide the Download address of Android Studio:

tools.android-studio.org/index.php

I download the tutorial with Windows 64-bit example:

Click Android-studio-IDE-171.4408382-windows. exe to download without android SDK

Then click on the software you have downloaded to install:

Next, select the plug-in you want to download, check it here! Click Next to proceed to the Next step

Here choose the path you want to download the installation, their own definition will not find oh! Click Next, click Install in the image below, Do not check, the check position is Do not create shortcut keys, you decide whether to create, Do not mean Do not create.

If nothing goes wrong, after a short period of time you should see the screen below, indicating that the installation was successful. Start the software. Click Finish

After Android Studio is opened, the configuration page is displayed

The second one means that you haven’t downloaded Android Studio, and the first one means that you have. If you choose the first one, it means that you have imported your previous configuration. And then you go to the interface that most people don’t understand.

This box pops up on startup: Let’s just click Cancel and look at the startup screen

The update has changed the format of the download, but it’s basically the same. If you look at the screenshots, it should look the same when you download it

Here standard and Custom, select Standard, 3.0 version can be this

When this screen appears, the installation is complete.

A few key points:

We came across the following picture:

Click Cancel to not set the Proxy port, how to click Setup Proxy friend, see the following:

SDK environment variable configuration:

Add Path variable:

Android application directory structure
  1. Assets directory: Assets directory stores relevant file resources used in the project, such as audio files and text files that we may use. These files are not compiled native files.

  2. Bin directory: The bin directory stores executable files. If the bin directory is empty, it indicates that the project is not executed. If the bin directory is not empty, the executable file is generated in this directory.

  3. Gen directory: Files in this directory are in read mode only and cannot be modified.

  4. Libs directory: This is where the relevant import packages are stored, and the files end with.jar.

  5. Res directory: This is where you store these files, such as image resource files, layout resource files, menu files, and so on. For layout files, mainly. XML format files, interface effect files.

  6. SRC directory: The directory where the relevant Java code is stored.

  7. Proguard-project. TXT file: This file is a script configuration file for obfuscating code.

  8. Project.properties file: This file is the configuration file information for the project.

AndroidDevTools

Collect Android SDK, development tools, Android tutorials, Android design specifications, free design materials, etc.

Website: www.androiddevtools.cn/

Git Tutorial

Git is a distributed version control system, a version control system is just a term. Git was invented for the convenience of people. Every time we write code, when we submit it to Github, we record the submission instructions, which describe what the code says and what changes are made. Keep track of your code additions and deletions on Github, so you can see what you have done and what you have changed each time. It is very convenient for others to know your operation behavior.

Website download, install Git:gitforwindows.org/

Open the GIT Bash software that you have downloaded

$ git config –global user.name “your.name” $ git config –global user.email “[email protected]

The key content

First open your Github project and click New Repositories. Then just name the project. 2. Open the CLI and enter https://github.com/... ./Test.git $ gitclonehttps://github.com/... . $cd test3. You have to copy your project into the premisetest$git add. $git commit -m "changeslog$git push origin masterCopy the code
// Assist git status to view changes gitlogGit rest --hard HEAD git rest --hard HEAD^ gitlogGit reset --hard ads2323 git reflog git reset --hard ads2323Copy the code

Making an introduction to

GitHub is a website, a hosting platform for open source and private software projects, because only support Git as the only version library format for hosting, so the name GitHub — from Baidu Encyclopedia. Git is a version control system, a piece of software designed to track the status of files over time.

Github web page concept

I wrote about the GitHub web concept before, but I’ll continue with this:

  1. Commit:Submit to the warehouse.
  2. Branch:Each independent branch is a version of the project.
  3. The master branch:We started out inGithubEvery project created has a branch, called the main branch.
  4. A commit message:We’re uploadingAndroidWhen you are in a project, you will see this word, which means you need to submit information, which is used to describe what you have done in this project. Then you can see the content and information you have done at a glance on the website, which is convenient for others to understand.
  5. Marge:This is what happens when you’re working on a project with another partner, and the submitted code shows you whether to merge,mergeYou can merge content on one branch into another.
  6. Pull the request:Pull code to work locally.

Page introduction effect

Introduction to interface Design

www.mockplus.cn/

conclusion

  • This article mainly explains Android foundation – system architecture analysis, environment construction, download Android Studio, AndroidDevTools, Git use tutorial, Github entry, interface design introduction

  • Now I will continue to explain other knowledge in Java and Android in depth, if you are interested, you can continue to follow

  • A small gift to walk or praise