Android Eclipse builds Android development environment

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

This article was written in 2015/3/13.

Home: http://www.cnblogs.com/game-testing/

Build an Android development environment under Eclipse

Written in front of the words:

Android development environment is diverse, there is no good or bad, the habit is the best.

This paper uses ECLIPSE+ADT+SDK to build an Android development environment and is also convenient for Robotium automation testing.

A. Installing the JDK

The JRE is required for Eclipse startup. Although eclipse comes with a JDK, the installation of the JDK is described here in order to avoid unnecessary hassles during the development and testing of the future.

JDK Download:

Http://www.oracle.com/technetwork/java/javase/downloads/index.html

It is recommended that you choose the latest JDK installation. Of course, for software compatibility issues, choose the appropriate version to download for your development environment.

Windows Configuration of the next JDK environment variable

On this point, there are many resources on the Internet, here is not to repeat. The required variables are:

New java_home: Fill in the JDK installation directory, such as E:\Java\jdk1.8.0

New classpath:.; %java_home%\lib;%java_home%\lib\tools.jar

Path :%java_home%\bin;%java_home%\jre\bin;

Enter java-version in cmd to check the Java version

JDK Differences from the JRE

JDK Java Development Kit

Java Development Toolkit, where Java programs are compiled into bytecode files that can be executed by a Java virtual machine through the JDK.

JRE Java Runtime Environment

Java The operating environment that is used to provide the environment supported by the Java runtime .

two. install Eclipse

Eclipse's website is http://eclipse.org

Click the Download button in the top right corner to go to the download page

Here we select the latest version of Eclipse IDE for Java developers to download.

About the version of Eclipse:

Eclipse IDE for Java Developers: This version is suitable for Java developers, integrated Cvs,git,xml editor, Mylyn, Maven integration and Windowbuilder plugins.

Eclipse IDE for Java EE developers: This version integrates Java EE Development Common plug-ins to facilitate dynamic Web site development. Suitable for use by Java Web developers. Integrated XML Editor, database viewing tool, and JSP visual editor available.

Eclipse for PHP Developers: This version is suitable for PHP developers, integrated with good PHP language support, git client, Mylyn and JavaScript Script Editor, HTML, CSS and XML.

Eclipse Standard: This version is the most basic version of Eclipse, suitable for Java SE Personal developers, or developers who want to configure plug-ins to suit their needs.

About Android Studio:

Google launched the Android Studio development environment is also very convenient, interested students can go http://developer.android.com/sdk/index.html understand (may need FQ), this article is not repeat.

three. Installing ADT under Eclipse

Adt:android development tools, the Android development tool.

Mode one, after opening Eclipse, the menu bar selects Help-eclipse Marketplace ...

If the interface does not refresh the situation, please try to wait or FQ,FQ tutorial please Baidu.

After you search for ADT, install

Mode two after opening eclipse, the menu bar selects Help-install New software ...

For more information, please refer to this article:

Http://jingyan.baidu.com/article/b0b63dbfa9e0a74a4830701e.html

Four. Download SDK

Restart Eclipse Discovery prompt error after installing ADT

Click Open Preferences to see that the path to the SDK is not available because the SDK is not installed and we are installing the SDK below.

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

Here we choose stand-alone SDK Tools, find the corresponding platform to download

After the download is complete, copy all of the folders to the SDK location path (or locate the SDK in the downloaded file directory) and restart Eclipse to complete the installation.

About the display of the SDK Manager icon

After installing ADT and SDK, there will be an SDK manager icon on the eclipse's Shortcut Bar

If not, please select Windows-customize Perspective in the menu bar ...

Then tick the Android SDK and AVD Manager

Five. Andro like download

Click the icon to open the SDK Manager and select the appropriate SDK to download

 

Image is downloaded from Google by default, due to the many prohibitions in the kingdom, it will cause the download failure and so on. There are currently two solutions.

The first kind, FQ,FQ way has many, self-Baidu, the author online casually to find a free VPN.

The second type, see Tutorial http://www.cnblogs.com/yjmyzz/p/4219829.html

Here only briefly describes

Open SDK Manager and select Android SDK Manager---Preferences in the menu bar ... Set the following

In the menu bar Select Tools->manage Add-on site ..., click New to add the following URL

Http://mirrors.neusoft.edu.cn/android/repository/addon-6.xml

Http://mirrors.neusoft.edu.cn/android/repository/addon.xml

Http://mirrors.neusoft.edu.cn/android/repository/extras/intel/addon.xml

Http://mirrors.neusoft.edu.cn/android/repository/sys-img/android-tv/sys-img.xml

Http://mirrors.neusoft.edu.cn/android/repository/sys-img/android-wear/sys-img.xml

Http://mirrors.neusoft.edu.cn/android/repository/sys-img/android/sys-img.xml

Http://mirrors.neusoft.edu.cn/android/repository/sys-img/google_apis/sys-img.xml

Http://mirrors.neusoft.edu.cn/android/repository/sys-img/x86/addon-x86.xml

Http://mirrors.neusoft.edu.cn/android/repository/addons_list-2.xml

Http://mirrors.neusoft.edu.cn/android/repository/repository-10.xml

The author uses this method to fail now, does not delve into the reason, hopes the reader to try more.

Six. Create a virtual machine

Click the AVD Manager button

To create an Android virtual machine, click the ' Create ' button below:

After starting the first load time is very long, you need to wait patiently (if the 20min is still not entered, please Google to find out why)

"No Cpu/abi system image available for this barget" when creating AVD

The solution can be referred to

Http://www.cnblogs.com/xionglee/articles/3036887.html

Reopen SDK Manager Select component Arm EABI v7a System image installation, and of course you can choose Intel related content

The tools used in this article:

system:Mac OS X 10.10.1

Eclipse : Eclipse IDE for Java developers Luna Service Release 2 (4.4.2)

ADT : Version 23.0.6.1720515

SDK : Version r24.0.2

Android Eclipse builds 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.