Android Environment Setup

Source: Internet
Author: User
Tags windows x64 android sdk manager

This article turns from http://www.open-open.com/lib/view/open1386252535564.html

Because of the version update, the software in this article is not the latest version, but it can be used as an example. Download the time when you try to download the latest, to do with the official synchronization! For well-known reasons, Google cannot be accessed, so we need to configure the agent, the Proxy tool is then served.

One, Android build development Environment (a), tool preparation 1. Download JDK

The JDK is the Java Development Kit (Java SDK), which includes the Java Runtime Environment, the base Class library, and the Java tools, which are the basis for running Java.

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

Find a link to download the JDK: (July 2013)

You may need to accept the license agreement, see:

Select "Accept" to download the version that corresponds to your operating system. This document uses Windows x64.

2. Download Eclipse

Eclipse is a software tool for developing Java programs.

Website: http://www.eclipse.org/downloads/

This document uses the Eclipse IDE for Java EE developers version:

3. Download the Android SDK

The SDK is Software Development Kit (software Development Kit). The Android SDK refers to the Android-specific software development kit.

Website: http://developer.android.com/sdk/index.html

This SDK provides an eclipse that has integrated ADT, not what we want, we want to separate, so we're going to do this:

You can also choose one of the downloads above, so you don't even have to use eclipse, but beyond the scope of this document.

4. Download ADT

ADT, the Android development tools (Android development tool), is a plugin for developing Android apps in Eclipse.

Website: http://developer.android.com/sdk/installing/installing-adt.html

At this point, we have all the tools we need. You can start the installation.

(b), installation configuration 1. Installing the JDK

Run the downloaded Jdk-7u25-windows-x64.exe and follow the prompts to step away.

1) test whether the installation is successful

After the installation is complete, you can check if the JDK was successfully installed by:

Open the cmd window and enter Java-version.

A screen similar to the following shows that the installation was successful:

2) Add Environment variables

Operation Steps:

System variables, environment variables, advanced system settings, properties, computers

Add <span ";" = "The <span of the >jdk"; = "" The path to the >bin directory. As follows:

2. Install the Android SDK

Once the SDK was downloaded directly, the path was configured in Eclipse, and now looks like a manager (SDK Manager) to manage the download updates and double-click the previously downloaded Installer_r22.0.1-windows.exe.

1) Install SDK Manager

Note: The directory here is the SDK directory that we will be configuring later.

When the SDK installation is complete, launch Android SDK Manager.

2) Install Platform

Just SDK tools is not enough, we need at least one Android platform and the latest SDK platform tools.

Launch Android SDK Manager, for example, tick Android SDK Platform-tools and Android SDK build-tools,android 4.2.2 folder, Extras Android support Library.

Then click Install Packages.

Select Accept License, install.

Time may be a bit long, do something else, come back later.

There may be an unsuccessful installation, such as the completion of the packages, there are 2 remaining, you can repeat the operation once. We need the package until the installation is complete.

3) Add Environment variables

Operation Steps:

System variables, environment variables, advanced system settings, properties, computer--New

Variable name: android_sdk_home

Add <span ";" = "" The path to the >SDK directory. As follows:

3. Install Eclipse1) Select workspace

Unzip the downloaded eclipse, such as D:\eclipse, and open eclipse.exe directly, and you will find a dialog box pop up.

Ask to choose a default workspace, select a later tick no longer ask, click OK.

2) Configuring ADT

Click Help->install new software, and then add->archive-> find the adt-22.0.1.zip we downloaded and give a name, such as ADT Plugin, such as:

When you are sure, tick developer Tools, Next:

When the installation is complete, you will be prompted to restart Eclipse,ok.

3) Configuring the SDK

After restarting, you will be prompted to configure the location of the SDK, such as:

Turn off the above window, window->preferences->android

The tagged stuff is the SDK path that was chosen before the SDK manager was installed. Select on OK.

Come on, let's start Hello world.

Second, Hello World1. Toggle Perspective View

Let's switch the perspective to Java, find the Perspective button in the top right corner, select Java in the popup window, and determine:

The toolbar has changed a little bit, with two more keys: The SDK manager on the left and the Android Virtual Settings Manager on the right, the AVD (Android VM) Manager. We're going to do it right away.

2. Create an AVD

The AVD (Android virtual device) is the virtual appliance that the Android app runs. To build an Android app to run, you must create an AVD, and you can configure a lot of running projects on each AVD.

Click a small button on the toolbar like a phone to pop up the dialog box:

Point new, let's create a new device: The SD card will generate an equivalent size file in the system to emulate the SD card, so it should not be set too large.

Click OK to create the new success.

Equipment Definition: Device definitions

The front four is a four device nexus, followed by screen size and different resolutions

3. Create the Hello World project

Click File--New--Android application Project

Fill in the application name and the corresponding information, the package name is generally the website domain name inverted write, package name must be unique, otherwise it is considered the same program. The target version is the most compatible version. Click Next:

Mark this project as a library: the Foundation for other applications, as a package exists.

These are the icons that set the startup program.

The above is a template selection for creating an application.

Click Finish to create a project.

When you are done, the Project Explorer window has a HelloWorld.

SRC source file

Gen ADT automatically generated Java files, programmers must not modify

Android 4.2.2+android Private Libraries jar file

Assets resource files, pictures, audio, videos, etc.

Bin binaries, compiled files

Libs third-party jar files that refer to third-party code

Res is also a resource file, unlike assets, where the generated files have IDs

4. Run the Hello World project

Right-click on the HelloWorld, Run as->run Configuration:

or right-click on the HelloWorld, Run as->android application:

The first boot may take a few minutes, please wait patiently:

Hello world! Although no code has been written yet, the classic Hello World interface appears. Once you see this interface, your Android code tour is officially set to sail. Have fun!

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.