Android Environment building and HelloWorld writing

Source: Internet
Author: User

The internship a little free these days, steal some time to experience Android, haha


has been engaged in background development, so probably the Java master is good, for the introduction of Android is also very helpful




Android Environment Setup


1. JDK, Eclipse

Generally engaged in Java development of friends, will have their own jdk,eclipse, here is omitted, I use here is jdk1.8,eclipse3.7


2. Android SDK

Android SDK official:http://developer.android.com/sdk/index.html

Download EXE installation files, after installation in the installation directory will have an SDK Manager.exe file, click to select the SDK version you want to install, do install



3. Eclipse plug-in ADT installation

help-"Install new software

Plugin address https://dl-ssl.google.com/android/eclipse/



4. Configuring the SDK Path



5. Virtual Device AVD Installation

windows-"Android vitural Device Manager


Specific configuration can refer to



OK, so the Android development environment has been built



Android HelloWorld


1. Create a project

file-"new-" Android application Project


Next->next



Next->finish, the project will add the activity mainactivity by default, so project creation is complete.


2. Running Android Project

Run AS-"Android application Project

Remember to create a virtual device AVD with the corresponding version of the project, for example, we use SDK4.4



Okay, here's the Hello World, and this activity layout is defined under Activity-main.xml.

<relativelayout xmlns:android= "http://schemas.android.com/apk/res/android"    xmlns:tools= "http// Schemas.android.com/tools "    android:layout_width=" match_parent "    android:layout_height=" Match_parent "    tools:context= "${relativepackage}.${activityclass}" >    <textview        android:layout_width= "Wrap_ Content "        android:layout_height=" wrap_content "        android:text=" @string/hello_world "/><!--here just referencing the external configuration , you can write Hello World!--></RelativeLayout>


Well, anyway, Android is pretty fun, and getting started is pretty simple.


Android Environment building and HelloWorld writing

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.