Before you build your development environment, you need to download the following packages:
One, install Java Execution Environment JRE (not this eclipse does not do) and JDK
Download Http://www.oracle.com/technetwork/java/javase/downloads/index.html website,
First install the JRE, then install the JDK, this nothing to say, just click on the next step is good ....
Will download the Android_sdk_r14 package extracted out, where all the tube, I generally extract into the eclipse file, casually put ...
Unzip after executing the SDK Manager.exe file, after execution for example, it is recommended to Android1.5 to Android4.0 Select All, Total is 33 packages, click Install Packagesbutton, install the SDK need to take some time, My bandwidth is 4M OK, about 50mins.
The new path value in the user variable is: the tools absolute path in the Android SDK (this machine is D:\AndroidDevelop\android-sdk-windows\tools).
Figure 2, setting environment variables for Android SDK
After "OK", start the computer again. After restarting the computer, go to the cmd command form and check that the SDK is installed successfully.
The execution android–h assumes that there is an output similar to the following, indicating a successful installation:
Figure 3, verifying that the Android SDK is installed successfully
Three: Install android ADT (Eclipse plugin)
Eclipse official Download http://www.eclipse.org/downloads/, select Eclipse IDE for Java EE developers, 212 MB, the original name is Helios, now called Indigo, Upgrade too fast, execute Eclipse Interface, choose menu Bar Help > Install New Software
Pop-up dialog asks for name and Location:name to take it yourself, location input Http://dl-ssl.google.com/android/eclipse or
https://dl-ssl.google.com/android/eclipse/ For example with what is seen:
Note: Many domestic users can not complete this upgrade, is generally carried out to half no matter what the reflection (other plug-ins, such as Pydev).
It doesn't matter, we go directly to the Android website to download this ADT plugin (adt-15.0.0.zip):http://developer.android.com/sdk/eclipse-adt.html
You can also click Archive to install offline.
After installation, you need to restart Eclipse, and after restarting eclipse will take the initiative to eject the path of the specified SDK, select Use existing SDKs, and existing location is the path to the SDK in the second step.
Then Next > Finish.
The installation ADK is complete ....
Unlike the previous version number, SDK management and ADT Management are separate, with two icons
。
Iv. Configuring the Android simulator
Click on the button on the right (like a phone), open the AVD Manager, click New to create a new emulator, enter name called avd4.0, specify Target Select Android4.0, then allocate SD card size 256M, and finally Create AVD 。
Creation of AVD complete ....
V. Our Hello world (we run it together!)
Select File > New > Android Project, named HelloWorld.
Write Point code:
Package Allen.liu.helloworld;
Import android.app.Activity;
Import Android.os.Bundle;
Import Android.widget.TextView;
public class Helloworldactivity extends Activity {
Private TextView Txtview;
/** called when the activity is first created. */
@Override
public void OnCreate (Bundle savedinstancestate) {
Super.oncreate (savedinstancestate);
Setcontentview (R.layout.main);
This.txtview = (TextView) Findviewbyid (R.id.txtview);
if (this.txtview!=null) {
This.txtView.setText ("Hello World");
}
}
}
Execute it.
android4.0 API documentation, emulator and other download links
ed2k://|file| [Android Development environment build].android-sdk_r15-windows.7z|626349500|5ed5d36562e047889ec8a79449962620|h= r6ltf5wmm2lcffotyiqent76pd4nvx7r|/