eclipse--android development environment construction tutorial

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

  1. Install JDK environment
  2. Download and install eclipse tools
  3. Download and install android SDK
  4. 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!");
    }
}
  • compilejavac HelloWorld.java
  • runjava HelloWorld

Download and install IDEA

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:

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:
SDK settings

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).

refer to

  1. Five steps to get Android development environment deployment - very detailed Android development environment construction tutorial
  2. sdk download http://developer.android.com/sdk/index.html
  3. ADT download address arrangement
  4. AndroidDevTools

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325656578&siteId=291194637
Recommended