How to build Windows ' next Android development environment

Source: Internet
Author: User
Keywords Program design development environment setup

With the rapid development of mobile Internet, the concept of front-end has changed a lot, and has not been limited to the web end. The Android system as the leader of the smartphone market, as a front-end development engineer, very necessary to understand and learn. But in the face of many learning materials, standing in front of the role of development engineers, how to pick out the right way to learn quickly, without wasting a lot of time to grope, the series of articles hope to help small partners.

The article will pick a few practical examples, throughout the entire series, involving Java, Android, program design and other aspects of knowledge, and strive to let everyone quickly grasp. As the saying goes, 工欲善其事, prerequisite, the first of the series from the window system under the Android environment to build. Let ' s go!

Installation of STEP1:JDK and settings for Java environment variables

JDK Download Address: http://www.oracle.com/technetwork/java/javase/downloads/index.html

JDK (Java Development Kit) is the core of the entire Java, including a series of Java development things, installation needs to configure the environment variables.

1) java_home

JDK installation path, this environment variable itself does not exist, you need to create, you can use%java_home% as a unified reference path, the value is: JDK on your computer installation path

2 PATH

The path attribute already exists and can be edited directly. function is used to configure the path to simplify the input of the command, the value is:%java_home%\bin

3) CLASSPATH

The path to use for the Java class at compile time, note that there are two values set here, (.;) Indicates that the JVM first searches the current directory. The value is:.; %java_home%\lib\tools.jar

Once configured, run the following command via CMD: Java-version,javac If return information appears, the setting succeeds

STEP2: Installing eclipse

Eclipse Download Address: http://www.eclipse.org/downloads/? (choose Eclipse Standard Version)

Eclipse is the IDE developed for Java and Android. Eclipse does not need to be installed, unzip the unpacked package, cut the Eclipse folder to the place you want to install, and set up your working directory when you open it.

STEP3: Install the Android SDK

Android SDK Download Address: http://developer.android.com/sdk/index.html

The Andorid SDK provides the Android Management Development Kit tool, providing the Android platform development kits and tools. Note that we need to download the SDK separately, because we are standalone, not integrated (integrated series tools). (pictured)

Run the installation file and set the Tools folder path under the installation directory into the PATH environment variable

Go to the installation directory to run SDK Manager, the beginning of what platform and tools are not, need to download back. Company intranet words need to use the agent to download.

To Tools-> Options ... Fill in the agent, click Close then there will be a number of platform list, the Android Tools selected to install, in addition, it is recommended to download more than 2.2 of the installation.

STEP4: Installation Configuration ADT

ADT is an Eclipse plug-in for managing the development of Android

1) Installation ADT

Start Eclipse, click the Help menu-> Install New Software ...? Add ...?, enter Address: http://dl-ssl.google.com/android/eclipse/

Select the items you want to install and complete the installation and reboot all the way next. So the ADT is installed.

2) Configure ADT

Select Window-> Preferences, in the pop-up panel will see the Android settings, fill in the installation of the SDK path, will appear just installed in the SDK platform package, press OK to complete the configuration. At this point, the Android environment is set up and can be developed for Android projects.

STEP5: Creating the first Android project

1 choice? File-> New-> other-> android-> Android creator Project

2 Enter the information required for the project

Creator name (applied name)

Project name (the name of the project in Eclipse)

Package name (the name of the package that holds the Java class, in essence, is the folder path that is stored, the. Number is the file delimiter, and the Java files we write are placed in the SRC directory of the project, such as the Com.tencent.helloworld representation class on the src/com/ Tencent/helloworld folder)

3 All the way to next until finish, our project was created.

4 because the program is running on the simulator, we have not created an emulator, so we need to create a, finish the point off.

5 Click the Triangle Run button and select the emulator you just created, and the program starts running. Tip: Start the simulator will be slower, so when the program to make changes, need to run again, do not close the simulator, directly on the emulator home or return key to exit the app, and then press run, you can run again.

End: Congratulations! Your Android environment has been successfully built, and in the next article, you will see the directory structure in the Android project and the adaptation issues when developing the interface.

This article by Tencent Isux Copyright, reprint, please specify the source

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.