Demonstrate how to build the android development environment without configuring environment variables. All software is written in this Article Latest Version
Friendship advertisement:Micro-beautyThank you for your support!
Related downloads
(1) download Java JDK:
Go to this page: http://java.sun.com/javase/downloads/index.jsp
(Or click Download directly) for example:
Select Download JDK to download only JDK. You do not need to download JRE.
(2) download eclipse
Go to this page: http://www.eclipse.org/downloads/
(Or click Download: Bt to download HTTP download.) For example:
Select the first one (Eclipse IDE for Java EE developers)
(3) download the android SDK
Description: Android
Two types of SDK Download versions: one is the SDK that contains a specific version, the other is only the upgrade tool, not the specific SDK version, and the other is about 20 mb, the previous one is more than 70 m.
Full Version Download (Android SDK 2.1 R01) upgraded version download (this is recommended. This example uses this version, which does not include a specific version. You only need to upgrade the version in eclipse)
2. Software Installation
(1) You only need to install JDK 6qualified without configuring environment variables.
(2) You do not need to install eclipse after decompression. After decompression, open it directly.
(3) decompress the android SDK, which does not need to be installed. decompress the SDK for later use.
(4) There are three folders, for example:
3. Eclipse Configuration
1. Install the android development plug-in
(1) Open eclipse and choose help> install new software on the menu bar. The following page is displayed:
Click Add. The following page is displayed.
URL: https://dl-ssl.google.com/android/eclipse/
(If an error occurs, change HTTPS to HTTP)
Name: Android (which can be customized here)
Click OK. The following page is displayed.
Click Next. The following page is displayed:
Click Next. The following page is displayed:
Select I accept the terms of the license agreements and click Next To Go To The plug-in installation page.
After the installation is complete, the following page appears:
Click Yes to restart eclipse
2. Configure the android SDK
(1) Click WINDOW> preferences to go to the following page:
If you select the decompressed directory of your android SDK, an error will be reported if you select an error. This is an upgrade tool. Currently, no SDK version is available.
(2) Upgrade the SDK version. Choose WINDOW> Android SDK and AVD Manager. The following page is displayed:
Select the update all button. The following page is displayed:
Select an item on the left, click accept to install, and click reject to disable installation. Here I only select SDK 2.1 and samples for API 7,
You can customize it as needed. After confirming, select the Install button to go to the installation interface as follows:
The installation is completed as follows:
(3) create an AVD (Android vitural device)
As above, go to the android SDK and AVD manager, select vitural devices, and click the new button.
Click the new button to go to the following page:
The name can be retrieved as needed. Select the desired SDK version for target, set the SD card size, and click Create AVD. the following result is displayed.
The above shows that AVD has been created.
3. Create an android Project
(1) choose File> New> Other To Go To The following page:
Select "create Android project" and click "Next" to go to the following page:
Name customization, application name customization, registration must contain more than one point, Min SDK version must enter an integer
Click Next to display the following interface:
Note: if an error occurs, for example, project... is missing required.
Source folder: 'gen'
, Delete the Gen-> Android. Test-> r. Java file. eclipse will generate this file for us and will not report an error.
(3) configure and run
Right-click the project and choose run as> RUN
Configuration:
Click the Browse button to select the project you want to run.
Select target to switch to the following page:
Select the running AVD on this page and set the box in front of the AVD to the selection status.
(4) run the test project
Right-click the project name and choose run as> Android Application to start running the androidProgram, As shown below:
Entering
Test program running result
Conclusion
now, the android development environment has been set up. If you have any questions, please leave a message. Note that I only downloaded the android SDK
R4 upgrade tool. Instead of downloading the specific SDK, I upgraded it through the android SDK management tool in eclipse, you can also download the specific SDK version directly, for example, Android
SDK 2.1 R1 has this download link, but it is better to use the upgrade tool for my tasks.