2. Hello world, the first application in eclipse + Android 4.2

Source: Internet
Author: User

1.

Download the android development environment package from http://developer.android.com/sdk/index.html on the official website and automatically decompress and install it.

ADT plug-ins and ndk plug-ins are installed:

In the eclipse toolbar, find help-> install new software,

In the Add repository dialog box, set the name as needed, and enter location:

Https://dl-ssl.google.com/android/eclipse/

Select the corresponding development component, especially the ndk plugins, so that you can use the local code of C ++ and C for development in the future.

2. Configure related environment variables.

Adb_root: D: \ develop \ adt-bundle-windows-x86 \ SDK \ platform-Tools

Ndk_root: D: \ develop \ android-ndk-r8d

3. Create the first application based on the instructions on the official website.

Create AVD and run the hello World Program.

Note that an error occurs:

. Error:
The connection to ADB is down, and a severe error has occured.
[09:36:56-helloopone] You must restart ADB and eclipse.
[09:36:56-helloopone] Please ensure that ADB is correctly located at 'd: \ develop \ adt-bundle-windows-x86 \ SDK \ platform-tools \ adb.exe'
And can be executed.

I found some solutions from the Internet,

(1) http://logger.iteye.com/blog/911977

(2) http://www.crifan.com/android_adt_the_connection_to_adb_is_down__and_a_severe_error_has_occured/

However, it is not solved. According to the method shown, it is estimated that the port running by ADB is occupied by a program, or the order of AVD start is incorrect.

I restarted my computer, started the myfirstapp project in eclipse, checked preference-> AVD mananger, and started the AVD simulator device,

Restart ADB server under cmd.


ADB start-Server

The startup information is displayed in Port 5037.

Then, click Run to run the android program. Solve the problem.

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.