Setup steps and Considerations for the Eclipse Android development environment

Source: Internet
Author: User
Tags android sdk manager java se

Setup steps and Considerations for the Eclipse Android development environment

Not complete

Email: [email protected]

qq:915043835

Objective

As a beginner, it took a long time to build the Eclipse Android development environment. Although there are a lot of demos on the web about development environment, there are still a lot of problems in the course of doing this with reference to these demos. Therefore, to organize their own development environment to build the process, for the needs of the small white students to learn from the common reference.

Summary of steps

The first step: Download Installing the JDK .

Step Two: Configure Windows on JDK the variable environment .

step three: Download ADT bundle (Integrated ADT of Eclipse development Environment) .

Fourth Step: Download and install the Android SDK .

Section Five Step: Configure ADB Environment Variables .

Section Six Step: Create Android Analog Device .

Seventh Step: Create a project to test.

Steps and explanations

First step: Download and install the JDK

Download Oracle's JDK to the Oracle Company's JDK download page (the current download page address is

http://www.oracle.com/technetwork/java/javase/downloads/index.html ), select the corresponding version of your computer system.

After downloading to your local computer, double-click to install. After the JDK default installation succeeds, two folders appear in the system directory, one for the JDK and one for the JRE.

Remark Description:

The full name of the JDK is the Java SE Development Kit, the Java Development Toolkit. SE represents the Standard Edition. The JDK is the core of Java, containing the Java runtime (Java Runtime Environment), a stack of Java tools, and a Java class library that is called when developers develop applications. We can open the Bin directory under the JDK's installation directory, which has many executable programs with suffixes named EXE, which are the tools that the JDK contains. In the second step, we can easily invoke these tools and their commands by configuring the JDK's variable environment.

Step Two: Configure the variable environment for the JDK on Windows

When the system is required to start an application, the system will first look in the current directory, if not the path specified in the system variable path to find. We said earlier that the JDK contains a bunch of development tools that are located in the JDK's installation directory, and in order to facilitate the use of these development tools, it is necessary to set the installation directory of the JDK to the system variables. This is why you need to set the bin directory of the JDK as a system environment variable after installing the JDK in Windows.

In order to configure the system variable environment of the JDK, we need to set up three system variables, namely Java_home,path and classpath. Here are the methods for setting these three variables.

Go to computer → properties → advanced system settings → advanced → environment variables

Steps to read

Java_home

Set the system variable name first, and the variable value is the JDK's installation path on your computer: C:\Program files\java\jdk1.8.0_20. Once created, you can use%java_home% as the unified Reference path for the JDK installation directory.

Path

The Path property already exists, can be edited directly, appended with the original variable:;%java_home%\bin;%java_home%\jre\bin.

CLASSPATH

Set the system variable name to: CLASSPATH variable value is:.; %java_home%\lib\dt.jar;%java_home%\lib\tools.jar.

Note the variable value string is preceded by a "." Represents the current directory, the purpose of setting up classpath is to tell the Java execution Environment, in which directories you can find the classes or packages that you need to execute the Java program.

Open the cmd window, enter Javac, display the content, then the configuration is successful.

Step three: Download ADT bundle (Integrated ADT Eclipse Development environment)

ADT Full Name: Android Development Tools, the Eclipse plugin provided by Google, is designed to provide a highly integrated Android development environment in eclipse.

Eclipse is an IDE developed for Java applications and Android (integrated development environment), Eclipse does not need to be installed, after the download unpack the unpacking package, cut the Eclipse folder to the place where you want to install, open when you set up your working directory. The ADT bundle is eclipse, which already integrates ADT.

Can go to Baidu Network disk download to achieve packaged ADT Bundle. : Http://pan.baidu.com/s/1ntLYp5J

Description: The ADT bundle downloaded by Baidu Network disk is the installation package (adt-bundle-windows-x86_64-20140702) of the Windows 64-bit system. Therefore, please note that if you want to install packages for other operating systems, you have to go to http://developer.android.com to download them.

Fourth step: Download and install the Android SDK

With the JDK variable environment configured and eclipse installed, the Java development environment is ready if you are just developing a common Java application. We want to develop Android apps through Eclipse, then we need to download the Android SDK (software development Kit).

The Android SDK provides the API libraries needed to develop Android applications and the development tools needed to build, test, and debug Android applications.

In the directory, double-click "SDK Manager.exe" to open the Android SDK Manager,android SDK Manage is responsible for downloading or updating different versions of the SDK package, we see the default installed Android SDK The manager installs only one version of SDK tools.

Note: This must be FQ before you can continue with the next steps!

Open the Android SDK Manager, which will get an installable SDK version, but if there is no FQ, there will be a failure to get it.

Then open the Android SDK Manager.exe, you can normally download the various versions of Android SDK. The default tools installation package needs to complete the installation. Android versions API you only need to select the installation package you want to install or update. This is a more time-consuming process, and there will be a failure to download, and the failed installation package will only need to be re-selected before it can be installed.

Note: This article is due to download the Adt-bundle version of the network disk, therefore, the Android version of the API, only download the android4.0 (API14).

Fifth step: Configure the ADB environment variable

Go to computer → properties → advanced system settings → advanced → environment variables

Steps to read

Configuring the variable "Android_sdk_home"

User name: Android_sdk_home

Variable value: The compression path of your Adt_bundle SDK, mine is D:\ALSP\JAVA_ANDROID\ADT-BUNDLE-WINDOWS-X86_64_20140101\SDK

Path variable:

Add tools and platform-tools paths in the PATH variable:

For example:

D:\alsp\java_android\adt-bundle-windows-x86_64_20140101\sdk\platform-tools;

D:\alsp\java_android\adt-bundle-windows-x86_64_20140101\sdk\tools;

Open the cmd window, enter ADB for testing, and show the following success.

Steps to read

Sixth step: Create an Android emulator

Create an Android emulator

Click on the following button in eclipse to open the AVD Manager (Android Virtual Device Manager)

New Android Simulator, click "New" button

Fill in the relevant parameters as required and click OK



In Android Virtual Device Manager manager, select the created AVD, click Start, enter and click Launch, and launch the emulator.


This is where the entire development environment is built. Follow the test by creating a simple project.

Seventh Step: Create a project to test

refer to the diagram to perform, file->new->android application Project;

Enter project name HelloAndroid1 , followed by default click Next

The new project is displayed as follows

In the Package Explorer, right-click to select the project Helloandroid->run as->android application

At this point, the development environment has been built and tested properly.

Precautions:

1. do FQ work: Because domestic cannot directly visit http://developer.android.com and other foreign websites, therefore, you need to do a good job in advance FQ, and then you can download the SDK and other tools, complete the installation. Online a lot of proxy, the use of domestic mirror site in the way after the trial, there are certain problems, waste a long time before and after the effect is still not very good. Therefore, it is necessary to choose a VPN software to stabilize and effectively implement access for subsequent software downloads and update upgrades.

2. version Compatibility: The version of the software must be consistent with the operating system version (for example, 32-bit, 64-bit), and ADT version to be compatible with the API version in the SDK. For example: In the test, this article in the Baidu Network disk provides Adt-bundle software, can be compatible with the SDK android4.0 (API14), but not compatible with android6.0 (API23).

3. Baidu: In the whole process if there is an error message, do not panic, the error message excerpt out of Baidu, you can obtain the relevant solutions. For example: The SDK tools installation needs to be in the tools path file coverage, the ADB environment variable configuration, such as the details of the issue, through Baidu can be resolved. In addition, all kinds of configuration do not understand things can also Baidu, deepen understanding and cognition.

Not complete

Email: [email protected]

qq:915043835

The article draws lessons from:

1. using integrated ADT bundles to build the Android development Environment

Http://www.cnblogs.com/zhouwenJS/p/3738191.html

2, Five steps to take care of Android development Environment Deployment-- very detailed Android development Environment Construction Tutorial

Http://www.cnblogs.com/zhouwenJS/p/3738191.html

3, "The first line of code--android", Guo Lin, People's post and telecommunications publishing house

4 , based on Adt-bundle-windows-x86 the Android Development Environment Construction

http://blog.csdn.net/hanshierlou/article/details/8930777

Setup steps and Considerations for the Eclipse Android development environment

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.