Android 4.x Environment setup

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

First,Android Build development environment (i), tool preparation1. download the 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 Downloads JDK Links: (7 months)

You may need to accept the license agreement, see:

Select the Acceptto 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 This 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 The SDK provides an Eclipse that has integrated ADT, not what we want, we want to separate, so here's what we're going to do:

You can also choose the above one to download so that you even Eclipse is not required, but beyond what is covered in this document.

4. Download ADT

ADT, the Android development tools(Android development tool), is the development of Android in eclipse The plugin for the application.

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 configuration1. Installing the JDK

run the downloaded jdk-7u25-windows-x64.exeand follow the prompts to step away.

1) test whether the installation is successful

after the installation is complete, the following methods can be used to check Whether the JDK was installed successfully:

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 Edit

add <span ";" = "The <span of the >JDK"; = "" The path to the >bin directory. as follows:

2. Install the Android SDK

before The SDK is ready to download, configure the path in Eclipse , and now looks like a manager (SDK Manager) tomanage download updates, 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.

Start Android SDK Manager, for example, tick Android SDK Platform-tools and Android SDK Build-tools,android 4.2.2 folder,Extras under the Android support Library.

and then tap Install the 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 the working space

to download the good Eclipse decompression, such as D:\eclipse, directly open Eclipse.exe, will find a dialog box pops up.

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

2) configuring ADT

Click Help->install new software, and then add->archive-> Find us a download good adt-22.0.1.zip, and give a name, such as ADT Plugin, such as:

when you are sure, tick Developer Tools, Next:

installation is complete and prompts for reboot Eclipse,OK.

3) Configuring the SDK

The configuration is prompted after reboot the location of the SDK, such as:

turn off the above window, Window->preferences->android

The circled thing is the previous installation The SDK path of the SDK Manager when it is selected . Select on OK.

It 's done, let's get started . Hello World .

Second, Hello world1. Toggle Perspective View

We'll switch the perspective to Java, locate the Perspective button in the upper-right corner and select Java in the popup window todetermine:

The toolbar has changed a little bit, with two more keys : On the left is SDK Manager, on the right is the Android virtual Settings Manager, the AVD(android Vsan) 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.

Device Definition: Device definitions

The first four are four kinds of devices . 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, a project is created.

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

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

or in Right-click on 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!

END

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.