Lee's device: a distinction between several concepts developed by Android applications

Source: Internet
Author: User
Tags android sdk manager

Objective:

When learning Android app development, often see a lot of nouns in eclipse, people are very confused, ask others is also said to be unintelligible. So it is their own online search more reliable, reference links are at the end.

??

List of persons involved:

Intel x86 Atom System Image

Google APIs Intel x86 Atom System Image

Android API Levels

Android Platform Version

Android SDK Version

Google APIs

Android version Names

??

Learning pathways:

Online blog and question and answer forum searched a bunch, and finally found that the official website is the most complete document, the original search blog is to avoid crossing web documents, and finally found that the official website document is the most able to solve the doubts of the place, it is indeed ironic.

So the programming class is best to check the official documents, and then check out the official documents of the nearest community, and finally check books and blogs.

The official document is often misunderstood, the first feeling is the official document chatty lack of interest, plus the whole English greatly reduced the motivation to read. In fact, the biggest advantage of official documentation is that it is informative, well-defined, and can be replaced by two of blogs that can save a lot of time.

??

------------------------------ The following for their own understanding, there may be wrong place

What does the Android Platform version upgrade mean?

Android is a software, an operating system, it relies on hardware, while the hardware also relies on it, both of them.

We know that Android's icon is a robot, then the Android device (such as mobile phones, tablets, watches and various embedded devices) compared to a robot, and the robot's brain or robot software system is Android, my soft and hard combination called Android Platform.

??

Each increase in Platform version means nothing more than a software upgrade or a hardware upgrade, both of which are blended together.

In a corresponding table in the official document Uses-sdk-element, click to see the changes in the Android 5.0 platform version relative to the previous version:

Enter platform highlight view, this page describes the biggest feature of this version (Lollipop: Lollipop):

Browsing the web reveals that the system is more of an improvement in algorithm improvement and architecture stability, as well as additional support for peripherals. It is obvious that Android is more of a service for people's various application needs, which is far beyond the basic functions that the kernel can provide. It also contains the content of the user experience, such as the proposed page design specification.

And all of these new features that lead to an Android platform upgrade will inevitably bring an API level upgrade, so what does the API level upgrade mean? Open the Android source directory to view or online can also:

In order to maintain backward compatibility, in theory the API (that is, the function call name, parameters, return value) should only increase or only modify the implementation, but not deleted, but the actual deletion, after all, Android is actually similar to a large application (because the basic functions of the OS has been implemented by the kernel) , it is difficult to ensure that the interface is always the same, and the kernel is much more stable than the interface requirements:

Below is the Android 5.0 source directory:

Click to view the difference report for the current API version and the previous API version:

??

What is the relationship between Android Platform version and API level?

If the Android platform is compared to a transformer (physical), then the API level can be understood as the transformer's skill levels, as the Transformers of this entity is constantly upgraded, its skill level is also increasing. Transformers physical version can be understood as a release version, like the release of luxury cars, external distribution often take into account some commercial or human factors, The version number is not so continuous and has a special nickname (just like you give every little pet dog in the house (assuming you do have a lot of them), it's not the number 1th dog, dog number 2nd. ), but API levels is a continuous increment of integers, it is not surprising, after all, the API is for developers to use (clearly distinguish the most important).

??

What is the relationship between Android SDK, Android APIs, and Android API?

First think about what is the API?

API (Application Programming Interface) is the meaning of the application interface, do not mistakenly think that only the operating system can improve the API, in fact, any program can provide the API, if a program calls the B program provides the function interface, Then the function interface of the B program is the API of the A program.

FB Someone on the analogy, if you compare Pikachu to a program, then he provides two API features, one is the steel tail, one is thunder, although you do not know what Pikachu is a ghost, not to mention that he can actually use the Thunder ==! Anyway, you just have to say, "Come on, Pikachu, use Lightning!" "

??

??

These concepts in front of the android can be replaced by other systems, such as windows, such as arm, such as xxoo, etc., that is, Android is a modifier.

Why are APIs more than API s? as the difference between dogs and dog, s represents the plural, but there is a layer of meaning: The API is interconnected, in order to achieve complex functions and to better hierarchical and sub-module management functions, call an API often need to call

Many of the underlying APIs to implement certain functions, so simply package them into APIs to provide to developers. So sometimes you'll find that the API you're invoking doesn't implement the functionality you want, but instead calls a set of other APIs, which is why.

For example, Li gang son and Li Gang is like two API, they are combined into APIs, if you are a classmate of Li Gang's son, you call the Li Gang API, it is necessary to call Li gang son's father Li Gang api, otherwise who bird you, Li gang son only with Li Gang can play a role.

What is the SDK?

The SDK is a software development tool, provided by the previous modifier, such as the Android SDK is provided by Google. Can you develop without the SDK? Of course, you can do the SDK to help you do the work done by hand, but it is almost unrealistic, so you have to have the SDK to assist you to develop, and need the corresponding platform provider to provide, of course, other providers are also available if they have the ability, the functionality of this JDK is similar.

The Android SDK Development tool provides

??

Android SDK Manager Interface:

??

??

How do I choose the appropriate API levels for my application?

The official documents are well summarized. Here's a brief. Join you have a Xiaomi phone, the above system is 5.0, the corresponding API version is 21, which means that you write a program installed on the above can be accessible and API 21 contains the function interface communication. With the API version of the upgrade, such as your mobile phone to 6.0, the corresponding API version has also been upgraded to 23, then the API 23 relative API21 added a lot of features interface, obviously you write for API 23 app If you use these new features can not be used on the old machine, Unless you add additional libraries to the program.

So how do you choose the minimum run platform version? If you want more people to use your program, it is obvious that the lower the version, the better, but if it is too low your program can call those high-level function interface, which will affect the quality of your program. So it can't be too low. The tradeoff is that the minority obeys the majority, and we choose the version with the largest market share as our development version.

Android API levels roughly categorized, excerpted from StackOverflow:

    • Android 1.5-2.3 (API levels 3-10)-Android made specifically for smartphones.
    • Android 3.0-3.2 (API levels 11-13)-Honeycomb, Android made for tablets.
    • Android 4.0-4.4 (API levels 14-19)-A big Merge with tons of additional functionality, totally revamped Android version , for both phone and tablets.
    • Android 5.0-5.1 (API levels 21-22)-Material Design introduced.
    • Android 6.0-6 .... (API levels-...) -Runtime permissions,apache HTTP Client removed

??

Some tools and other tools in the Tools/build-tools/platform-tools directory are described in the reference link 13:

Aapt

Full name Android Asset packaging Tool, mainly used with three:

A. Generating a R.java file

B. Configuring Androidmanifest.xml

C. Compiling resources

AAPT's parameters are numerous, powerful, and many custom packaging processes can be implemented by adjusting the parameters of the AAPT, such as the Q-cubic

To avoid modifying the import path of R.java in your code, you can specify the package name AAPT generate R.java. More parameters can see the help of AAPT, packaging process has special needs, should first look at AAPT support.

adb

The most frequently used tools, what install,uninstall,push,pull and so on are not introduced, here are some other commonly used commands:

"ADB forward": maps the port on the phone to the local port, which is useful when debugging a network application

"ADB shell pm Clear": Clears all data for the package, except for SD card custom path data

"ADB shell PM enable/disable": Enable or disable Android component or Android apps, if you want to force stop an application, kill all the app's process, and prevent automatic start, disable very good, This is not going to erase the data.

"ADB shell am Start": Initiates an activity that can be either through the package name Class name or through the action

"ADB shell am StartService": Start a service

"ADB shell AM Broadcast": Send a broadcast

"ADB shell am Force-stop": Kills an application and its processes

"ADB shell Dumpsys": Dump the current state of the system, very useful, including cpuinfo, meminfo, activity stack and so on, debugging tool, the status of support is as follows, each state subcommand can be used "adb shell Dumpsys Xxx-h "query, such as" adb shell Dumpsys activity-h "

"ADB shell bugreport": Sometimes there is a problem, but do not catch the log, you can use this command to dump the log, Android will save a period of crash log

"ADB shell Screenrecord": 4.4 began to support the use of this command to record screen operation of the video, much better than the normal software, used to do a demonstration, etc. useful

fastboot commands used in bootloader mode, brush, Unlock essentials

Jobb.bat is used to create the APK Expansion files tool, because some Android applications are very large, such as the game, a 1, 2G, will cause the APK file is too large, so Android proposed APK Expansion The concept of files is to separate large data files from the program itself so that users can install the application and then download the data file

etc1tool used to convert PNG images into ETC1 format tools, ETC1 format for OpenGL material maps

Virtuous Ten Studio Reverse Engineering integration Environment, I have been using

Dex2jar Dex bytecode converted to class file

AVD Manager: Android Virtual Machine Management interface

SDK Manager: SDK management tool for updating the SDK

Android NDK: The NDK supports the development of the Android Native Library, as well as the development of Android apps using C + +, the directory structure is roughly the same as the SDK and requires some knowledge of Linux development to understand

?

One last question: Why is the Android framework so complicated?

I think all the complexities are for simplicity, the human brain is complex enough, but the function seems simple-think something.

Similarly, the Android framework is complex, even in order to maximize the simplification of programming, as far as possible to devise a mechanism for the application layer to complete any desired strategy, think of such a mechanism is complex, with the complexity of the mechanism to change the independence of the strategy.

As for how to come up with such a mechanism, it is another matter.

??

grep "Name" *./*-NR

??

Reference Links:

  • Android Developer It's best to look at this update every month.
  • Android Source
  • <uses-sdk> Detailed official documentation
  • Understanding Android API levels for those confusing versions of Eclipse, the configuration explained the following
  • What is does API level mean?
  • Api? Sdk? Silly to know.
  • Q. What is the difference between each version of the Android SDK for the great gods?
  • Detailed Android SDK directory and role
  • Android SDK directory structure and role
  • What is the Android SDK build-tools, platform-tools and tools? And which version should be used?
  • More Info on Android Build tools and commands
  • elinux.org? is the Linux foundation subordinate? Consumer Electronics Linux Forum maintenance of a Embedded Linux Wiki. The Wiki comprehensively and systematically combs the knowledge of all aspects of embedded Linux.
  • Getting Started with Android-工欲善其事 its prerequisite describes some of the tools in the SDK directory

    ??

    ??

Lee's device: a distinction between several concepts developed by Android applications

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.