To learn Android development, you need to build a development environment first.
First, JDK (no installation)
1. Copy
D:\Java\jdk1.8.0_91
2. Configure Environment variables
Select Computer--Right-click Properties--clicking Advanced System Settings The System Properties page appears.
Click the advanced-to-environment variable to pop up the following page:
java_home=d:\java\jdk1.8.0_91; (The file directory where the JDK resides)
Classpath=.; %java_home%\lib\dt.jar;%java_home%\lib\tools.jar;%java_home%\jre\lib\rt.jar
Path=d:\java\jdk1.8.0_91\bin; the original.
3. Check
Start-up and run-->cmd input java-version appear as:
So far, the JDK configuration is complete.
Second, run Eclipse ADT (without installation)
1. Configure an environment variable android_home = D:\JAVA\ADT-BUNDLE-WINDOWS-X86_64-20140702\SDK
2. Run Eclipse.exe directly (without installation)
Double-click the Eclipse.exe in the downloaded elipse.
Third, the test environment
1. Can download the Hippocampus simulator (address: http://droid4x.haimawan.com/), night God simulator, etc.
2. You can also use plug-in USB for real-machine debugging
Iv. Creation of the project
1. Open Eclipse--File-----Android application Project
2. Configuration, since most are now dual-core system, so the configuration in the SDK at more than 4.0, always NEXt, to the last Finish, Eclipse has helped us configure the default settings, such as:
3. After the finish, the interface is as follows:
4. Then the program runs, right-click on the project name, select Run as---Android application
Will go into the simulator of choice, of course, first to run a simulator, in the upper right of Eclipse (the default is this) DDMS, see if there is no emulator, if not, you can click
Select DDMS Click OK.
Enter the DDMS interface as follows:
The default Devices below there is no, if there is a simulator run, there will be those emulator background service running situation,
So how to read here, is through the SDK directory Platform-tools inside the Abd.exe program to read the
Read the interface to the emulator:
5. Select the operating environment
To this is a simple HelloWorld program run successfully!
Finally, we introduce ADB
ADB's all-called Android Debug Bridge, is the role of the Debug bridge. With ADB we can debug the Android program via DDMS in Eclipse, which is the Debug tool.
ADB has a special way of working, using ports such as the socket TCP 5554 to communicate with the IDE and QEMU, by default ADB will daemon the relevant network port,
So when we run eclipse, the ADB process will run automatically.
ADB is a tool in the Android SDK that allows you to manipulate the Android emulator or real andriod devices (such as G1 phones) directly. Its main functions are:
* Shell running the device (command line)
* Manage port mappings for emulators or devices
* Upload/download files between computer and device
* Install the local APK software to the simulator or Android device
ADB is a client-server program where the client is the computer you use to operate, and the server side is the Android device.
Android First program Hello World