Self-use engineering tutorial (1) Build a development environment and HelloWorld for your own use

Source: Internet
Author: User

Self-use engineering tutorial (1) Build a development environment and HelloWorld for your own use

Starting from today, we will try to create an App for capturing network data packets on the Mobile End of the Android platform.

The first step of the task is to establish a programming environment. We chose Eclipse as a tool to create an Android 4.0 environment and create a HelloWorld program packaged as an App to confirm the environment.

First, install the Java JDK environment on your computer. Go to the following URL:

Http://www.oracle.com/technetwork/java/javase/downloads/index.html

Select the appropriate version based on the system, x86 for 32-bit systems, and x64 for 64-bit systems.

You can right-click "properties" on "this computer" (Windows 10), "This computer" (Windows 8), or "computer" (Windows 7 ", resolution on the pop-up page.

Install the SDK as prompted.

 

In terms of IDE, we chose Eclipse Mars.2 Release (4.5.2) and can download the green package directly on the official website:

Http://www.eclipse.org/downloads/

You can refer to the previous method to determine the 32/64 bits.

The downloaded package is a compressed package, which can be directly used without installation.

You can double-click it to directly use it. The first time you open it, a prompt will pop up to set the workspace (workspace), that is, the default storage location. After the settings are completed, check the check box and do not prompt again.

Next, install the Android development environment for Eclipse ,:

Select adt-15.0.0.zip (click to download ).

Select the next step. You must check and agree to the next step before continuing.

After the installation is complete, proceed to the next step:

Choose android-sdk-windows (click to download) to decompress the folder, and then Apply and OK.

This completes the configuration of the Android development environment.

Bytes --------------------------------------------------------------------------------------------

To detect the environment, we will create a HelloWorld program.

Double-click string. xml

Change the blue part to Hello world!

Right-click the project:

Select the folder to be output.

Select Finish. The packaged apk file appears in the selected folder.

This apk file can be uploaded to the Android phone for installation. We can also try it on the android simulator.

Bytes -------------------------------------------------------------------------------------------------

 

Now you can open the Android Simulator Interface:

After the simulator is started successfully and the Android interface is displayed, install the apk file in the simulator.

In Eclipse, you can easily package project code into the simulator,

 

Wait a moment to install the app into the open simulator ,:

Open visible:

So far, we have achieved all goals.

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.