In today's world, mobile is basically the world of Android and Apple, basically no Microsoft, as a loyal supporter of Microsoft, but also to change.
But Android and iOS development is two completely different worlds, there is no one technology, after the development can be run at any terminal, the answer is yes, HTML5
OK, gossip doesn't matter, go straight to the subject.
One, Environment construction
1, download JDK (this many BD a bunch)
- 1. Environment construction
- 1.1. JDK Installation
- 1.2. Eclipse Installation
- 1.3. Android SDK Installation
- 1.4. ADT Installation
- 1.5. Create AvD
- 2, HelloWorld
1. Environment Construction
1.1. JDK Installation
If you do not have the JDK, you can go here to download, the next task is to install the prompt step-by-step. The steps for setting environment variables are as follows:
- The following environment variables are added to the system variables, such as environment variables, properties---
- The Java_home value is: D:\Program files\java\jdk1.6.0_18 ( the directory where you installed the JDK )
- The Classpath value is:.; %java_home%\lib\tools.jar;%java_home%\lib\dt.jar;%java_home%\bin;
- Path: Append%java_home%\bin at the beginning;
- Note: setting environment variables in the previous four steps is not necessary for building an Android development environment and can be skipped.
After the installation is complete, you can check that the JDK is installed successfully. Open the cmd window and enter Java–version to view the version information for the JDK. A screen similar to the following shows that the installation was successful:
Java_home=c:\program files\java\jdk1.7.0_51
Classpath=.; %java_home%\lib\tools.jar;%java_home%\lib\dt.jar;%java_home%\bin;
Path=%java_home%\bin; C:\users\feeling\appdata\roaming\npm;%java_home%\bin;
3, download Android SDK (ECLIPSE+SDK+AVT), can one download, in configuration, but Google a lot of servers, because of political factors, inaccessible, so
I'm giving you a full package of packages already packaged.
Software Baidu Cloud Link: http://pan.baidu.com/s/1i3h3Vyl Password: nps2
Note: "Android SDK all update before October 2, 2014" Inside is updated all the Android SDK Adt-bundle, think agent update slow friends can consider download direct use, the latest version of the support to Android 5.0, compressed packet size 8.77GB, uncompressed size after 30GB (both Windows and Linux version available)
4,
HelloWorld
- Create a new project "Android Project" Through the Project menu, file-I
- Then fill in the necessary parameters as shown in: (Note here I checked the Google APIs, you can choose what you like, but you want to create the appropriate AVD)
Description of the relevant parameters:
- Project name: The names of the folders that contain this project.
- Package Name: Packages name, following Java specification, it is important to distinguish different classes by package name, I use Helloworld.test.
- Activity name: This is the main class name of the project, and this class will be the subclass of the activity class of Android. An activity class is a simple launcher and control program class. It can create an interface as needed, but it is not required.
- Application Name: An easy-to-read title on your application.
- The "Use default location" option in the "Selection bar" allows you to select an existing project.
- After clicking Finish, click on the eclipse's Run menu to select Run configurations ...
- Select "Android Application", click on the upper left corner (button like a piece of paper with a "+" number) or double-click "Android Application", there is a new option "New_configuration" ( can be changed to our favorite name ).
- In the right Android panel, click Browse ..., select HelloWorld
- Tick the appropriate AVD in the automatic of the target panel, and if there is no AVD available, you need to click on the manager in the lower right corner and create the appropriate AVD. As shown in the following:
- Then click the Run button, and if successful, there will be an Android emulator interface, as shown in:
The first chapter of HTML5 development app