1. Environment Setup 1. Download the android SDK and adt2, open eclipse, click Install new software under help, and click Add to install ADT on the pop-up interface, you can create a path with the location ADT (note: the path should not contain a Chinese name) by yourself. After adding the path, click OK, and then click Next... Next... 3. Install the required Virtual Machine: Click window, and then click AVD manager. On the displayed page, click New. The target version is selected (my version is 2.3.3) the built-in under skin selects resolution 2. eclipse for Android sets the code prompt function. In the eclipse for Android Editor, two main types of file Java and XML Code Automatic prompt functions are required. 1, automatic prompt in the Java file: in eclipse, choose Window> preferences> JAVA> Editor-content assist> auto activation triggers for Java. The default setting box is a vertex. Now, change it :. abcdefghijklmnopqrstuvwxyz (, 2. Automatic prompt function in XML code: Enable eclipse and choose Window> preferen CES> XML> editor> content assist> auto activation> prompt when these characters are inserted. The default value in the setting box is <=:. Change it to <= :. abcdefghijklmnopqrstuvwxyz (, 3. Create an android project on the first instance and right-click the project --> New --> other... --> Android project --> next --> name the project --> next --> select a version (I chose 2.3.3) --> next --> the package name must be at least level 2 --> click Finish. When the new project is created, the tool automatically generates a lot of code, for example, R. java file, which belongs to an internal file, is a string under values under Res that cannot be modified. the name and content of the application can be modified in the XML file: <? XML version = "1.0" encoding = "UTF-8"?> <Resources> <string name = "hello"> I am the content of the first application </string> <string name = "app_name"> the first application </string> </resources> file androidmanifest. XML is very important. I will introduce some configurations in this file. <? XML version = "1.0" encoding = "UTF-8"?> <Manifest xmlns: Android = "http://schemas.android.com/apk/res/android" package = "cn. csdn. hr. Android" Android: versioncode = "1" Android: versionname = "1.0"> <! -Manifest is the root tag. Android is the namespace package name. --> <! -- Android version --> <uses-SDK Android: minsdkversion = "10"/> <! -- Application a single application can contain multiple activity icons: Application icons mobile app realistic icons @ represent reference label: Tag name --> <application Android: icon = "@ drawable/ic_launcher" Android: Label = "@ string/app_name"> <! -- Equivalent to bean in spring. The action name in struts2 is the class name. label is the label name. --> <activity Android: Label = "@ string/app_name" Android: Name = ". lession01activity "> <! -- Intent filter --> <intent-filter> <! -- Action indicates the entry of the android. Intent. Action. Main program --> <action Android: Name = "android. Intent. Action. Main"/> <! -- Category indicates the category and category of an action, which means Android is used for the action. intent. category. launcher: start the application when it starts. --> <category Android: Name = "android. intent. category. launcher "/> </intent-filter> </activity> </Application> </manifest> you can right-click the project name to start running, then we can see that the name and content are displayed on the "Mobile Phone". Note: 1. the android startup is slow, so do not turn it off frequently, which will be a waste of time. However, enabling Android requires a relatively large amount of memory. Therefore, you must ensure that the drive C has sufficient space. The longer the drive time, the more memory occupied. Therefore, you cannot open the drive all day. 2. How to view the startup information on the console. the startup information of Android is displayed in the console, and the startup information of Android is displayed in logcat. The following describes how to put logcat on the console: window --> show View --> Other --> Find logcat under the folder Android and click OK.