introduction
Installing the Android development environment on Windows is neither simple nor complicated, but the inability to access google normally in China brings a lot of trouble to the Android development environment. Now I record my construction process as follows, I hope it will be helpful to the small partners who are involved in android development.
Android development environment deployment process
- Install JDK environment
- Download and install eclipse tools
- Download and install android SDK
- Install the ADT plugin
Install JDK environment
Download the JDK installation package of the corresponding version and platform from the oracle official website, and double-click to install it . There are two folders under the default installation path C:\Program Files\Java, a JDK folder and a JRE folder: such as jdk1.8.0_66 and jre1.8.0_66
The full name of JDK is the Java SE Development Kit, which is the Java Development Kit. SE stands for Standard Edition. JDK is the core of Java, including the Java Runtime Environment (Java Runtime Environment), a bunch of Java tools and Java class libraries that are called for developers to develop applications.
We can open the Bin directory under the jdk installation directory, there are many executable programs with the suffix exe, these are the tools included in the JDK. The basic tools included in the JDK are:
- javac: Java compiler, converts source code to bytecode.
- jar: A packaging tool that packages related class files into one file.
- javadoc: Documentation generator that extracts documentation from source code comments.
- jdb: debugger, a debugging tool.
- java: Run the compiled java program.
Environment variable settings:
- Add environment variable: JAVA_HOME C:\Program Files\Java\jdk1.8.0_66
- Append environment variables: path %JAVA_HOME%\bin;%JAVA_HOME%\jre\bin;%path%
- Add an environment variable: CLASSPATH .;%JAVA_HOME%\lib\dt.jar;%JAVA_HOME%\lib\tools.jar Represents the path of the class or package required by the Java program
Test program HelloWorld.java
public class HelloWorld {
/**
* 输出一行字符串“Hello World!”
* @param args
*/
public static void main(String[] args) {
System.out.println("Hello World!");
}
}
- compile
javac HelloWorld.java
- run
java HelloWorld
Download and install IDEA
- Download https://www.jetbrains.com/idea/download/
- Crack method
-0.0.0.0 account.jetbrains.com
add to the hosts file
- enter http://idea.lanyus.com/ , click to get the registration code
Download and install eclipse
https://www.eclipse.org/downloads/Download Eclipse IDE for Java EE Developers, and unzip it directly after the download is complete.
Download and install Android SDK
The JDK variable environment is configured and Eclipse is installed. At this time, if you just develop ordinary JAVA applications, then the Java development environment is ready. We want to develop Android applications through Eclipse, then we need to download the Android SDK (Software Development Kit) and install the ADT plug-in in Eclipse, this plug-in can associate Eclipse with the Android SDK.
The Android SDK provides the API libraries needed to develop Android applications and the development tools needed to build, test, and debug Android applications. The official website url http://developer.android.com/sdk/index.html must be over the wall to browse. But we can use the domestic url, the following domestic mirrors can be used:
- Open Source Mirror Site of Open Source Software Association of Chinese Academy of Sciences: http://mirrors.opencas.cn/ , http://mirrors.opencas.org/ , http://mirrors.opencas.ac.cn/
- Dalian Neusoft Institute of Information Open Source Mirror Site: http://mirrors.neusoft.edu.cn/
- Beijing University of Chemical Technology Mirror Station: http://ubuntu.buct.edu.cn/
Log in to the open source mirror site of the Open Source Software Association of the Chinese Academy of Sciences, enter the android directory, and download the android sdk installation package.
Start the Android SDK Manager, open the main interface, select "Tools", "Options..." in turn, and the "Android SDK Manager - Settings" window will pop up, which is as follows:
The corresponding tools can then be installed via the Android SDK.
Configure environment variables: ANDROID_HOME C:\Program Files (x86)\Android\android-sdk
Install the ADT plugin for Eclipse
The Java development environment is configured, the IDE for Android development is installed, and the Android SDK is downloaded and installed, but Eclipse has not been associated with the Android SDK, that is, they are now independent of each other, just like guns and bullets are separated. In order to make the creation, running and debugging of Android applications more convenient and faster, the Android development team has customized a plug-in specially for Eclipse IDE: Android Development Tools (ADT).