With the rapid development of mobile Internet, the concept of front-end has changed a lot, and it is not confined to the web-site. The Android system as the boss of the intelligent machine market, as a front-end development engineer, it is necessary to understand and learn. But in the face of a lot of learning materials, the role of front-end development engineers, how to pick the right way to learn quickly, without wasting a lot of time to explore, the series of articles hope to help small partners.
The article will select a few practical examples, throughout the entire series, involving Java, Android, program design and other aspects of knowledge, and strive to let everyone quickly grasp. As the saying goes, 工欲善其事, its prerequisite, the first of the series from the window system under the Android environment to build. Let ' s go!
Tools/Materials
Installation of JDK and settings for Java environment variables
- 1
Jdk
Jdk:http://www.oracle.com/technetwork/java/javase/downloads/index.html
The JDK (Java development Kit) is the core of the entire Java, including a series of Java development things, installation needs to configure the environment variables.
- 2
Java_home
JDK installation path, the environment variable itself does not exist, need to create, you can use%java_home% as a unified reference path, the value is: JDK on your computer installation path.
- 3
PATH
The Path property already exists and can be edited directly. The function is used to configure the path, simplifying the input of the command with a value of:%java_home%\bin.
- 4
CLASSPATH
For the path of the Java class at compile time, note that the two values are set here (.;) Indicates that the JVM searches the current directory first. The value is:.; %java_home%\lib\tools.jar.
- 5
After the configuration is complete, run the following command through CMD: Java-version,javac If the return message appears, the setting succeeds.
END
Install Eclipse
- 1
Eclipse
Eclipse:http://www.eclipse.org/downloads/? (choose Eclipse Standard Edition).
Eclipse is an IDE developed for Java and Android. Eclipse does not need to be installed, unzip the unpacking package, cut the Eclipse folder to the place where you want to install it, and set up your working directory when you open it.
END
Installing the Android SDK
- 1
Android SDK
Android sdk:http://developer.android.com/sdk/index.html.
The Andorid SDK is a development kit tool for Android management, which provides development kits and tools for Android platforms at all levels. Note that because we are standalone installed, not integrated (integrated series tools), we need to download the SDK separately. ()
- 2
Run the installation files and set the Tools folder path in the installation directory into the PATH environment variable.
- 3
Go to the installation directory to run SDK Manager, at the beginning of what platform and tools are not, need to download back. Company intranet words need to use Agent to download.
- 4
To Tools, Options ... Fill in the agent, click Close Then there will be a number of platform list, the Android Tools selected installation, it is recommended that more than 2.2 of all download installation.
END
Installing the Configuration ADT
- 1
Installing ADT
Launch Eclipse, click on the Help menu, Install New software ...? Add ...?, enter Address: http://dl-ssl.google.com/android/eclipse/.
- 2
Select the item you want to install, and the next completes the installation and restarts. This way, ADT is ready to install.
- 3
Configuring ADT
Select Window---Preferences, in the pop-up panel you will see the Android settings, fill in the Installed SDK path, you will have just installed in the SDK of the platform packages, press OK to complete the configuration. The Android environment is now ready to be developed for Android projects.
END
Create your first Android project
Choose android Application Project, File--New
Enter information required for the project
Application name (name of the app)
Project name (the name of the project in Eclipse)
Package name, which is the folder path in which the Java class is stored, is the file delimiter, and the Java files we write are placed in the SRC directory of the project, such as Com.tencent.helloworld, where the class is placed in the src/com/ Tencent/helloworld folder)
All the way next until finish, our project was created.
Since the program is running on the emulator, we have not created an emulator, so we need to create one and close it when we have created it.
Click the Triangle Run button and select the emulator you just created, and the program starts running. Tip: Start the simulator will be slow, so when the program to make changes, need to run again, do not close the simulator, directly on the simulator home or Back button to exit the app, and then press run, you can run again.
- 6
End: Congratulations!
Your Android environment has been built successfully.
Build an Android development environment under Windows