1. Environment installation preparation
1. compiling environment developed by Jak 1.5 or JDK 1.6 Java
2 "eclipse 3.4 Java developed ide
3. Android SDK 3.0 Android Compiler (software development kit, that is, software development kit) A collection of development tools used by software engineers to build application software for specific software packages, software frameworks, hardware platforms, operating systems, etc.
4 "Android ADT requires the installation of ADT (Android development tools) plug-in, which is a development tool for Android in eclipse. Android development middleware includes a development tool that requires an ADT update URL. In eclipse, it can be automatically updated at home.
2. Installation Steps to provide more detailed guidance for new users, this article starts from the installation of JDK
1. Install JDK
1 download URL: http://www.oracle.com/technetwork/java/javase/downloads/index.htm
Download result L
2. Install JDK on drive C by default ..
3. Configure the environment my computer-> right-click Properties-> advanced-> environment variables->
Java_home = c: \ Program Files \ Java \ jdk1.6.0
Classpath = .; c: \ Program Files \ Java \ jdk1.6.0 \ Lib \ tools. jar; C: \ Program Files \ Java \ jdk1.6.0 \ Lib \ DT. jar; C: \ Program Files \ Java \ jdk1.6. \ bin;
Path = c: \ Program Files \ Java \ jdk1.6.0 \ bin;
Or:
Java_home = c: \ Program Files \ Java \ jdk1.6.0
Classpath =.; % java_home % \ Lib \ tools. jar; % java_home % \ Lib \ DT. jar; % java_home % \ bin;
Path = % java_home % \ bin;
4> check whether the installation is successful
Run-> cmd-> JAVA-version
Show: Verify that the installation is successful
2. Install eclipse
You can directly decompress eclipse to focus on the configuration issues.
Open eclipse (the workspace needs to be set when you open it for the first time, and set it according to the actual situation) -- windows -- preference -- Java -- installed jres -- add --
Click "Standard VM .. Okay.
3. Install ADT
1. Install adt0.9.1 online
1) Open eclipse, help-> install new software...-> select Add after work ....
2) Enter Android plugin (User-Defined name) in the name option, and enter http://dl-ssl.google.com/android/eclipse/,#https://dl-
Ssl.google.com/android/eclipse/, click OK, and then select the region in the name below.
3). Download and install it by default.
2. Offline Installation
1) Open eclipse, help-> install new software...-> select Add after work ....
2) enter (User-Defined name) in the local option, find the compressed package of adt0.9.1 in archive, click OK, and then select the option in name below.
Official Android ADT-0.9.6.zip:
Http://dl.google.com/android/ADT-0.9.6.zip
Official Android ADT-0.9.7.zip:
Http://dl.google.com/android/ADT-0.9.7.zip
3. test whether the installation is successful:
1) after installing the ADT plug-in, close eclipse and restart.
2 ). open File-> New-> project ..., check whether the android project option is available. If the option does not appear, click other... option to see if the general option has Android options
. If yes, the installation is successful. If no, the installation fails.
4. Upgrade eclipse and ADT plug-ins:
1) with the gradual upgrade of the Android version, the ADT also needs to be upgraded along with the upgrade of the Android version. Otherwise, the android project compilation and running errors may occur;
2) Open eclipse, help-> check for updates... generally "select all", continue "Next" and "accept license", and "finish" to complete the upgrade;
5. Install the android SDK
After step 4 is completed, the android icon and a small icon appear in the project.
Now you need to configure the SDK used by ADT
1. Download Android sdk1.5:
Http://developer.android.com/intl/zh-CN/sdk/1.5_r2/index.html
Decompress the downloaded package
2. windows -- preference -- android
Application --- OK
3. Create a virtual device: AVD
AVD is called Android virtual device, which is a virtual device running on Android. It is recognized by the android simulator. To run a created Android program, you must create an AVD. You can configure many running projects on each AVD. I understand that a virtual mobile phone device can be customized on a PC.
There are two ways to create AVD. The first is the elcipse development environment, and the second is the creation through the command line.
Create an eclipse development environment:
Select Android AVD manager under windows in the elcipse menu.
In name, enter the AVD name. In target, select the class library (Android 1.1, android1.5, or Google APIs 1.5), create the sdcard and skin, and click Finish.
Create a command line:
Find the path of tools in the command line, and enter the command: Android create AVD -- Target 2 -- name my_avd
Android is the command, followed by the parameter, create AVD is the AVD, Target 2 is the level, and name is the AVD name.
Now, the preparation for Android is complete.
6. Compile a small column
A new Android projected Configuration
The structure of the created project is as follows:
Running result: This is the running result ~ You need to learn more about how to understand the generated demo.
Note: after creating a project, note that the API level required for installing the AVD Virtual Machine for running arget must be consistent with the project min SDK version. Otherwise, compilation fails.