Android environment Configuration

Source: Internet
Author: User

I like Java and Android.

Write down this article to commemorate yourself.

Not much nonsense:

Configuration steps:

(My development tools are shared with my classmates. If I have resources, I will use them more)

For Java Development, you must first install JDK. After JDK is installed, you must configure environment variables:

1. Download JDK (http://java.sun.com/javase/downloads/index.jsp), the version I downloaded is: jdk-6u14-windows-i586.exe

2. Install jdk-6u14-windows-i586.exe

3. Configure environment variables: Right-click "my computer" --> "advanced" --> "environment variables"

1) create a java_home variable in the system variable. The variable value is: C: \ Program Files \ Java \ jdk1.6.0 _ 24 (based on your installation path)

2) create a classpath variable with the variable value:.; % java_home % \ Lib \ tools. Jar

3) Add the variable value % java_home % \ bin; % java_home % \ JRE \ bin in the PATH variable (no need to create a new variable) (note that the variable values are separated)

4. "Start" --> "run" --> enter "javac" --> "enter". If the command is printed properly, the configuration is successful!

Analysis of supplemental environment variables:

Java_home: JDK installation path

Classpath: the class path loaded by Java. Only the Java commands of the class in classpath can be identified. A "." is added before the path to indicate the current path.

The downloaded file contains three shadow files. If you put them together, you will not take them out again. (* ^__ ^ *)

Note: The following articles are from the Internet.

Bytes. This way

Install 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.


Enter URL: https://dl-ssl.google.com/android/eclipse/ (Change HTTPS to HTTP if an error occurs)

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, and I can customize it myself. 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), enter 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, such as project... is Missing required source folder: 'gen', then gen-> android. test-> r. if the Java file is deleted, eclipse will generate the file again for us and no error will be reported.

(3) configure and run

Right-click the project and choose run as> RUN configuration to go to the following page:
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 the android program, as shown below:


Entering


Test program running result

Anyway, I have something to do in the East and the West. In fact, all methods are acceptable. I have tried several methods on the Internet. The reason is, if you are full, you have nothing to do!

Upload another copy of the instructor's documents. Fortunately, there is no interest in writing this document. I believe that the teacher will not care about it.

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.