[1] Android learning notes [the first android program], Android android

Source: Internet
Author: User
Tags android sdk manager

[1] Android learning notes [the first android program], Android android

1. java JDK & configure java System Variables

Java JDK

Please install it on Baidu

Configure java System Variables

1. Open my computer -- properties -- Advanced -- Environment Variables

2. Create System variables JAVA_HOME and CLASSPATH

Variable name: JAVA_HOME variable value (jdk installation directory): C: \ Program Files \ Java \ jdk1.7.0

Variable name: CLASSPATH variable value:.; % JAVA_HOME % \ lib \ dt. jar; % JAVA_HOME % \ lib \ tools. jar;

3. select the environment variable named "Path" in "system variables" and double-click the variable to add the absolute Path of the bin directory in the JDK installation Path to the value of the Path variable, separate the half-width semicolon with an existing path. Variable name: Path variable value: % JAVA_HOME % \ bin; % JAVA_HOME % \ jre \ bin;

This is the java environment configuration. After the configuration is complete, eclipse is started directly, and the java environment configuration is automatically completed.

2. Download eclipse & ADT & Android SDK

The package I shared is ready for use without directly downloading these items.

If you feel insecure, you can download it from Baidu.

(Make sure that the 64-bit Eclipse version of your system corresponds to the 64-bit java JDK. Otherwise, an error will be reported)

3. Create an android Project

The key point is that you must first create an android simulator.

After all the installation is complete, these options will be selected on the eclipse toolbar for Android Virtual Device Mangager.

    

Because I have created one in advance, ignore it. Click Create on the right.

    

    

    

Select the created simulator and click Start.

    

Then there will be an interface like this, which is the android simulator. This simulator has a normal boot time of about 30 seconds.

    

If this interface does not appear, check the causes. If the interface has been started properly, ignore the following content.

1. Check whether the arm eabi v7a System Image of Android SDK Manager is installed.

      

2. Change the memory of the simulator, and adjust the startup time.

      

      

Create a project

Click Flie> New> Android Application Project in Eclipse.

      

Next, the file path

      

The next step is to set different icons in different positions of the icon.

      

Next, what kind of activity is selected by default?

      

Next, you can manually modify the relevant name in the file master startup method.

      

The first project is created

      

Right-click the project name and choose run as> Android Appliction to RUN the program.

If No compatible targets were found. Do you wish to a add new Android Virtual Device

This is because there is no suitable virtual machine. You need to create a new mobile phone virtual machine because some virtual machines do not match the selected ones.

The simulator corresponding to the project I created is version 4.0. It also needs to be version 4.0.

The result is as follows:

      

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.