Build an eclipse + android4.0 development environment in Windows

Source: Internet
Author: User

Official building steps: http://developer.android.com/index.html

Before creating an environment, you need to download the following packages:


1. Install the Java Runtime Environment JRE (not running this eclipse) and JDK

Official download http://www.oracle.com/technetwork/java/javase/downloads/index.html,

Install JRE first, and then JDK. If you have nothing to say, just click Next ....

2. Install the android SDK

: Http://developer.android.com/sdk/index.html

Package address: http://3x007.verycd.com/topics/2887449/

Decompress the downloaded android_sdk_r14 package and store it wherever necessary. I usually decompress the package to the eclipse file and put it under my account...

Decompress the package and run the SDK manager.exe file. After the package is run, we recommend that you select android1.5 to android4.0. A total of 33 packages are available. Click Install.
The 33packages button takes some time to install the SDK. My bandwidth is 4 MB, and it is about 50 mins.


The download result is as follows:


OK. SDK installation is complete ....

· In the user variable, create an absolute path (D: \ androiddevelop \ Android-SDK-Windows \ tools) in the path value of Android SDK ).


Figure 2. Set android
SDK Environment Variables

After "OK", restart the computer. After restarting the computer, enter the CMD command window and check whether the SDK is successfully installed.
If Android-H has the following output, the installation is successful:


Figure 3. Verify android
Is the SDK installed successfully?

 

3. Install Android ADT (Eclipse plug-in)

Eclipse official download http://www.eclipse.org/downloads/, select eclipse
IDE for Java EE developers, 212 mb. It was originally named Helios and now called indigo. The upgrade is too fast. Run the eclipse interface and select the menu bar
Help> install new software


In the pop-up dialog box, enter name and location: Name as needed, and enter location in the http://dl-ssl.google.com/android/eclipse or

Https://dl-ssl.google.com/android/eclipse/as shown in the following figure:


Note: many domestic users cannot complete such upgrades. Generally, this is not reflected in the first half (Other plug-ins, such as pydev ).

No relationship, we directly download this adtplug (adt-15.0.0.zip) to android: http://developer.android.com/sdk/eclipse-adt.html

You can also click archive to install it offline.

 

After the installation is complete, you need to restart eclipse. After the restart, eclipse will automatically pop up the path of the specified SDK. Select use existing sdks and the existing location is the path of the SDK in step 2,

Next> finish.

ADT installation is complete ....

Different from previous versions, SDK management and ADT management are separated and have two icons

.

 

4. Configure the android Simulator

Click the button on the right (like a mobile phone), open the AVD manager, click New to create a simulator, and enter name
Avd4.0, specify target to select android4.0, and then assign the size of the SD card.
256 m, and finally create AVD.


AVD created ....

5. Our Hello World (we run it together !)

Select File> New> Android project and name it helloworld.

Write code:

Packageallen. Liu. helloworld;

 

Importandroid. App. activity;

Import Android. OS. Bundle;

Importandroid. widget. textview;

 

Public classhelloworldactivity extends activity {

Private textview txtview;

/** Called when the activity is first created .*/

@ Override

Publicvoid oncreate (bundle savedinstancestate ){

Super. oncreate (savedinstancestate );

Setcontentview (R. layout. Main );

This.txt view = (textview) findviewbyid(r.id.txt view );

If(this.txt view! = NULL ){

This.txt view. settext ("Hello World ");

}

}

}

 

// Run

 

Android API documentation, simulators, and other Download Links

Ed2k: // | file | androiddevelopment environment ].android-sdk_r15-windows.7z | 626349500 | 5ed5d36562e047889ec8a79449962620 | H = Hangzhou |/

 

Related Article

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.