Basic Android learning-Build a development environment and HelloWord (1)

Source: Internet
Author: User
Tags android sdk manager

Basic Android learning-Build a development environment and HelloWord (1)

Before building an Android development environment, let's take a brief look at Android.
Android is a free and open source operating system based on linux developed in java and mainly used on mobile devices.
The following four tools are required to build an Android development environment:
Jre: java runtime enviroment java runtime Environment.
Sdk: Software Develop Kit, which provides APIs of different Android versions.
Adt: android develop tool android development tool, is a plug-in of eclipse.
Avd: android virtual device android simulator, a virtual android system.
Four main components of Android development are:
Activity: Used to present functions.
Service: the Service is running in the background. The interface is not displayed.
BroadcastReceiver: used to receive broadcasts.
Content Provider: supports data storage and reading in multiple applications, which is equivalent to a database.
To build an Android environment, follow these steps:
1. Configure java environment variables.
My computer-properties-Advanced System Configuration-environment variables-system variables, add the following environment variables:
JAVA_HOME: D: \ Java \ jdk1.6.0 _ 14.
CLASSPAT:.; % JAVA_HOME % \ lib \ tools. jar; % JAVA_HOME % \ lib \ dt. jar; % JAVA_HOME % \ bin;
Path: append % JAVA_HOME % \ bin before the path value;
Run the echo & JAVA_HOME % and java-version commands in the cmd window to verify whether the environment variable is configured successfully.
2. Configure the android environment variable.
My computer-properties-Advanced System Configuration-environment variables-system variables, add the following environment variables:
SDK_HOME: D: \ Android \ android-sdk-windows.
Path: append % SDK_HOME % \ platform-tools; % SDK_HOME % \ tools before the path value;
Run the echo % SDK_HOME % and adb commands in the cmd window to verify whether the environment variable is configured successfully.
3. Install the atd plug-in on myeclipse.
Decompress adt-15.0.0.zip and copy the files in the decompressed features directory and plugins directory to the myeclipse installation directory.
C: \ software \ myeclipse \ MyEclipse 10 \ dropins directory under the features directory and plugins directory.
4. Install avd.
Open myeclipse and add several icons in the menu bar, including Opens the Android SDK Manager and Opens the Android Virtual Device Manager.
And Opens a wizard to help create a new Android project. Click Opens the Android Virtual Device Manager to create an avd.
5. Integrate the SDK to myeclipse.
Click Windows-Preferences-Android to introduce the SDK In SDK Location.
6. Create an Android project.
Right-click new-Andorid Project (enter the Project name)-next (select the SDK version)-next (enter the application name, package name, and Activity name)-finish.


7. Run the Android project.
Right-click the project Run As-Run deployments...
If an android simulated interface is displayed, the operation is successful.

Related Article

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.