Google mobile OS Android Application Development

Source: Internet
Author: User

Google, a network giant, recently released its Linux-based mobile phone operating system, Android. The latest SDK can now be downloaded, and its App development environment turns out to be Java! At present, Google has launched an Eclipse plug-in Android Development Tools (ADT) to simplify Development. According to official site documents, it is very easy to develop an Android Application under Eclipse.

Download the Android SDK for Windows, decompress the package, Install the plug-in directly in Eclipse, and select Help-> Software Update-> Find and Install ..., Select Search for new features to install and enter the address https://dlssl.google.com/android/eclipse/. then, you can use nextalong the way:

After the installation is complete, restart Eclipse and make some settings for the SDK. Choose Window> Preferences> Android:

Enter the SDK root directory in the SDK Location to complete the settings.

To create our first Android Application, you only need to File in Eclipse> New> Project ..., Select Android-> Android Project, and enter:

Project name: HelloWorld
Package name: com. javaeedev. android. hello
Activity name: Hello
Application name: Hello

The project structure after creation is as follows:

Hello. java is the main class. Open it and you can see that the ADT has automatically generated the runable code:

The compiler prompts a syntax error. It doesn't matter. Do not comment it out. Directly compile the project and an R. Java is automatically generated. This is the resource file constant automatically generated by the ADT Preprocessing Program. We don't need to worry about it. You can modify the layout and displayed text in RES/layout/Main. xml.

The next step is run. Open Run-> open run dialog ..., Select Android Application and create a new configuration:

After setting the project and activity, you can directly run it. You can select different simulators. The following are the running effects of several simulators:

Android simulators do a great job, far exceeding wtk and the Simulators of some mobile phone manufacturers. However, because the SDK is still in the RC version, there are still some bugs. The first bug I encountered was that if the simulator was forced to be shut down during startup, some processes would not be able to exit. The next operation would fail and the computer would be normal after it was restarted. As a new mobile development platform, the prospect of Android cannot be underestimated.

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.