Android tools portal

1. http://www.androiddevtools.cn/
Copy the code

The Android framework

The whole Android is divided into four layers: 1. Application layer Android Application 2. Android Application Framework 3. Runtime liBS +DVM 4. System layer operating system kernelCopy the code

The environment variable

Configure platform-tools and tools to environment variables. 2. Bridge between the ABD development environment SDK and mobile phone or emulator 3 D:/dir/ a.pk 6. Adb uninstallCopy the code

Create a project

2.Project Name: Project Name on IDE 3.Package Name: unique identifier of the Application (signature key) 4. Android dropped the 4.0.3 version, which was at least 15. Target SDK: 6.Com compile With: current SDK version Theme: None The Theme is empty by defaultCopy the code

Project directory

Android applications are divided into three parts: 1. SRC source files (Java code) 2. Res resource files (layout, images, strings, colors, fonts, etc.) 3. 4. Gen: the auto-generated directory R,BuildConfigCopy the code

XML file structure

Extensible Markup Language XML HTML format, is a fixed tag < HTML >< head> <title></titile> </head> <body>.. </body> </ HTML > XML can customize tags as you like so we need to describe an object, person class person {String name; String sex; int age; } Person p=new Person(" 男", "男",22) <Person name=" Person "sex=" man" age=22 /> </p></br> XML can write attributes at the end of tags and add them in the middle unless you want to add other components internally, you usually just close <Collection><! <List> < name=" Person "sex=" male" age=22> </ List> </Collection> The entire XML is a tree structure, there must be only one root, and each tag can be written inside the attribute. Some components can be wrapped around other components, and some cannotCopy the code

manifest.xml

Android standard namespace XMLNS: android = "http://schemas.android.com/apk/res/android" 1. The application application node 2. The activity the user interface, <intent-filter> 5. Open this page is mian 6. < action android: name = "android. Intent. Action. MAIN" / > 7. / / the name of the table, He is a start page, will be placed on the table 8. The < category android: name = "android. Intent. The category. The LAUNCHER" / > 9. < / intent - filter >Copy the code

The simulator

Nox_adb Connect 127.0.0.1:62001Copy the code

The main interface

SRC /MainActivity is the equivalent of our main application, protected void onCreate (Bundle saveInstanceState) {// The life cycle of the component, The first startup calls super.onCreate(saveInstanceState); // Set the layout setContentView(layout file r.layout.activity_main/component); }Copy the code

Resource file

Drawable - Images/other drawable XML files Layout - Layout resources For android UI display configurationCopy the code

Share with you

I want to work my way up

Fly forward on the blades at the highest point

Let the wind blow dry tears and sweat

I want to work my way up

Waiting for the sun to watch its face

Little days have big dreams

I have my day

Let the wind blow dry tears and sweat

One day I will have my day