[Android Development Learning] Day01

Source: Internet
Author: User

Android System Introduction

?October 2003, Andyrubin founded Android technology company?Acquired by Google in August 2005?November 2007, Google led the establishment of an open mobile phone alliance to jointly develop and improve the Android system?November 2007, the 1.0Beta version of Android?Become the world's largest smartphone operating system by the end of 2010

Application Framework

Component:

View component : Button,editview,textview,list.

Content Providers: The data for Android apps is Private,contentprovider is the sharing of data that can be implemented between service applications.

ResourceManager: Resources include: image, user interface (layout xml), font, color, UI component ID, unified management through ResourceManager.

Notificationmanager (message notification Management): a prompt to provide a message on the status bar. For example, when a text message comes in, Android automatically prompts the message in the status bar.

Activitymanager (activity Management): Manages the life cycle of an application and controls the navigation of the application, playing the role of the controller.

WindowManager (Window Management ) manages all windows that are started

Locationmanager (location Management): Manage map Services related features

Telephoneymanager ( Telephone Management ) : used to manage phone-related functions.

Packagemanager (Package management): Manage any applications that are installed on the Android system.

Android's architectural hierarchy is clearly divided. The biggest advantage of layering: the use of services provided below and provide a unified service for the upper layer, shielding the differences between the layers and the following layers, when the layer and the lower layers have changed without affecting the upper level, thus ensuring the overall system structure stability.



Build the Environment

1. Installing and configuring the Android SDK

2. Install Eclipse shortcut keys

3. Create and run the project

Jdk:java Development Kit, version 1.6 or above

Android SDK (software Development Kit)

Eclipse IDE

ADT Plugin


Configuration process:

Method 1: Download and install jdk->eclipse->android sdk-> install and configure ADT

Method 2: Install the JDK and download a large package of Android development kits directly from the Android website.


Environment configuration
1,JDK Configuration C:\Program Files\java\jdk1.8.0_11\bin
2, My Computer right-click Properties--Advanced system Settings---> Select Advanced tab--environment variables--System Variables---> Search path
Be careful not to delete existing variables
Tap home or end to paste the bin directory
Note and other variables with ";" Separated


SDK Configuration

D:\adt-bundle-windows-x86_64-20131030\sdk\tools
D:\adt-bundle-windows-x86_64-20131030\sdk\platform-tools

Locate the path as above, copy and paste into the path variable

Configuration of the AVD simulator

When configured, open the Eclipse.exe file execution to configure the AVD simulator

During the general development process, select:

Nexus S (4 ' -480*800hdpi),

Android 4.0 (API level 14)

RAM 768

Internal Storage 200M,

SD Card 200M


Once created, select, start to open the AVD simulator.


Common shortcut keys for the Eclipse IDE

? Ctrl+1 Quick Fix ? Ctrl+d Delete the current row ? Ctrl+alt+↓ Copy the current line to the next line? Ctrl+alt+↑ Copy the current line to the previous row ? Alt+↓ the current line and the following line interchange position? Alt+↑ the current line and the upper line interchange position? Alt+enter displays the properties of the currently selected resource? Shift+ctrl+enter inserts a blank line in the current row? ctrl+/comment on the current line, and then uncomment it? Ctrl+o quick Display class structure? Ctrl+t quickly displays the inheritance structure of the current class? Ctrl+k refer to the selected word for quick positioning to the next? Ctrl+e Quick Display drop-down list of the current edit area?CTRL+SHIFT+J Reverse Incremental Lookup?Ctrl+shift+f4 Close all open editing areas?Ctrl+shift+x all the currently selected text to uppercase?Ctrl+shift+y all the currently selected text to lowercase?Ctrl+shift+f formatting of the current code?Ctrl+shift+p positioning to match for?ctrl+shift+/Multi-line comments?Alt+shift+r renaming?Alt+shift+m Extraction Method?Alt+shift+c Modifying method signatures?Alt+shift+l extracting local variables?Alt+shift+v Moving methods and variables?CTRL+F11 running the project?

Create and run an Android project

after the IDE eclipse environment is turned on, right-click in the left column, new->android application project-> Enter information about the project

Enter the project description in the%newandroid Project dialog box as follows:

? Application name-refers to the name of the program installed on the emulator display? Project name-refers to the names of projects that are displayed in Eclipse? Package name-each Android app has its own pack name, which is in the form of a Java package? Minimum Required sdk-Program minimum supported SDK version? Target SDK version for sdk-program? Compile Compiler SDK version of the with-program, usually the same as the TARGETSDK version? theme-the theme of the application interface, using the default

individual file descriptions in a new project



Debug on a real machine, using DDMS mode




[Android Development Learning] Day01

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.