Learn about Android CH01

Source: Internet
Author: User

First, JDK (no installation)
1. Copy
D:\Java\jdk1.8.0_91
2. Configure Environment variables
java_home=d:\java\jdk1.8.0_91
Classpath=.; %java_home%\lib\dt.jar;%java_home%\lib\tools.jar;%java_home%\jre\lib\rt.jar
Path=d:\java\jdk1.8.0_91\bin; the original.
3. Check
Random Directory Run Java-version


Second, run Eclipse ADT (without installation)
1. Configure an environment variable ANDROID_HOME=D:\JAVA\ADT-BUNDLE-WINDOWS-X86_64-20140702\SDK
2. Directly run Eclipse.exe Three, this eclipse.exe used to write Android with the previous eclipse.exe with the written Java will not conflict four, open Eclipse.exe, and then in the upper right corner click the plus "+", Then click Ddms, if the following image appears, the connection is successful.

Download the Hippocampus simulator the first step to select the language, from the second step after the direct next step, to the appearance of the following this picture, it has been successful.

Six

Note: If you cannot connect the device, resolve the following three steps:
One: Open Task Manager and end Adb.exe
Two: Close eclipse, then open Task Manager, end Adb.exe
Three: Restart the computer

Vii. new project, output a Holle world

Steps below:

First step: Click on file, then click on Android Application Project, then this screen appears

Second step: Then fill in the name, and finally click on the new, and finally click on Finsh can

Step three: After the project is completed, then under this project under SRC under the Com.example.xxx package under the Mainactivity.java Open

This class mainactivity inherits the activity class, in which the output "Holle Welcome come to Android" is written as follows:

The R.ID.TEXTVIEWL in the above code corresponds to the textview1=0x7f080000 in R.java under the Gen file.

public static final class ID {
public static final int action_settings=0x7f080002;
public static final int button1=0x7f080001;
public static final int textview1=0x7f080000;
}

Eight, let the Mainactivity class run up the following steps:

Right click on the project Point->run as-> Click on Android application can, and finally appear this screen:

Learn about Android CH01

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.