[Android] Build an android development environment in Eclipse, Android android

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

[Android] Build an android development environment in Eclipse, Android android

This article was written on February 13.

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

Build an android development environment under Eclipse

Preface:

There are a variety of Android development environments and there are no advantages or disadvantages. The habit is the best.

This article uses Eclipse + ADT + SDK to build an android development environment and is also convenient for automated testing in robotium.

 

I.Install JDK

JRE is required when Eclipse is started. Although Eclipse comes with JDK, JDK installation is described here to avoid unnecessary troubles during future development and testing.

Download JDK:

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

 

We recommend that you select the latest JDK installation. Of course, for software compatibility issues, please select the appropriate version for the development environment to download.

WindowsConfiguration of JDK Environment Variables

There are many references on the Internet. I will not describe them here. The required variables are:

Create JAVA_HOME: Enter the JDK installation directory, for example, E: \ Java \ jdk1.8.0

Create CLASSPATH:.; % JAVA_HOME % \ lib \ tools. jar

Path: % JAVA_HOME % \ bin; % JAVA_HOME % \ jre \ bin;

Enter java-version in cmd to check the java version.

JDKDifferences from JRE

JDK Java Development Kit

JavaDevelopment Kit. Java programs are compiled into bytecode files that can be executed by Java virtual machines through JDK.

JRE Java Runtime Environment

JavaRuntime Environment, used to provide the environment supported by Java Runtime.

 

II.Install Eclipse

Eclipse web site for http://eclipse.org

 

Click DOWNLOAD in the upper-right corner To Go To The DOWNLOAD page.

 

Here we will download the latest version of Eclipse IDE for Java Developers.

Eclipse version:

Eclipse IDE for Java Developers:This version is suitable for Java developers who integrate plug-ins such as CVS, Git, XML editor, Mylyn, Maven integration, and WindowBuilder.

Eclipse IDE for Java EE Developers:This version integrates common Java ee development plug-ins to facilitate dynamic web site development. Suitable for Java web developers. Integrates the XML editor and database viewing tools to provide a jsp visual editor.

Eclipse for PHP Developers:This version is suitable for PHP developers and integrates 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 and is suitable for individual Java se developers or developers who want to configure plug-ins as needed.

About Android Studio:

The Android Studio Development Environment launched by Google is also very convenient. If you are interested, you can goHttp://developer.android.com/sdk/index.htmlFor more information, see FQ.

 

 

III.EclipseInstall ADT

ADT: Android Development Tools, which is an Android Development tool.

Method 1: Open eclipse, and select Help-Eclipse Marketplace in the menu bar...

If the interface cannot be refreshed, try to wait or FQ. For the FQ tutorial, Baidu.

 

Search for ADT and install it.

 

Method 2 open eclipse and select Help-Install New Software...

 

For details, refer to this article:

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

 

4.Download SDK

After installing ADT, restart eclipse to find an error.

 

Click Open Preferences to check that the SDK path is unavailable because the SDK is not installed. Next we will install the SDK.

 

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

 

Here we select Stand-alone SDK Tools and find the corresponding platform for download.

 

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

SDK Manager icon display

After the ADT and SDK are installed, the SDK Manager icon is displayed in the eclipse shortcut bar.

 

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

Check the Android SDK and AVD Manager.

 

 

5.Download Android Images

Click the icon to open sdk manager and select the appropriate sdk for download.

 

By default, images are downloaded from google. Due to many prohibitions of tianchao, downloading may fail. There are currently two solutions.

First, there are many methods for FQ and FQ. I use Baidu to find a free VPN on the Internet.

The second, see the tutorial http://www.cnblogs.com/yjmyzz/p/4219829.html

Here is a brief description.

Open SDK Manager and choose Android SDK Manager> Preferences... from the menu bar. The settings are as follows:

 

On the menu bar, choose Tools> Manage Add-on Site... and 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

I have failed to use this method. I hope the readers will try more.

 

6.Create a virtual machine

Click AVD Manager.

 

 

 

Click the create button to create an android virtual machine, for example:

 

 

Loading for the first time after startup takes a long time and you need to wait patiently (if you haven't entered it after 20 minutes, please google to find the reason)

 

"No CPU/ABI system image available for this barget" during AVD Creation"

For solutions, refer

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

Re-open the SDK Manager and select the arm eabi v7a System Image component for installation. Of course, you can also choose intel-related content.

 

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

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.