Five steps to deploy Android development environment

Source: Internet
Author: User

Five steps to complete the deployment of an Android development environment.
First step: Install the JDK.
Step Two: Configure the variable environment for the JDK on Windows.
Step three: Download and install Eclipse.
Fourth step: Download and install the Android SDK.
Fifth step: Install the ADT plugin for Eclipse.

First step: Install the JDK

To download the Oracle Company's JDK, Baidu "JDK" can enter the Oracle company JDK download page (the current download page address is http://www.oracle.com/technetwork/java/javase/downloads/ index.html), select the corresponding version of your computer system. After downloading to your local computer, double-click to install. After the JDK default installation succeeds, two folders appear in the system directory, one for the JDK and one for the JRE. The JDK includes the following basic tools: The Javac:java compiler, which converts the source code into bytecode. Jar: Package tool to package related class files into one file. Javadoc: Document generator, extracting documents from source notes. Jdb:debugger, debug the error-checking tool. Java: Run the compiled Java program.Step Two: Configure the variable environment for the JDK on WindowsIn order to configure the system variable environment of the JDK, we need to set up three system variables, namely Java_home,path and classpath. Here are the three variables that are set to guard against.Java_homeSet the system variable name first, and the variable value is the JDK's installation path on your computer: C:\Program files\java\jdk1.8.0_20. Once created, you can use%java_home% as the unified Reference path for the JDK installation directory.PathThe Path property already exists, can be edited directly, appended with the original variable:;%java_home%\bin;%java_home%\jre\bin.CLASSPATHSet the system variable name to: CLASSPATH variable value is:.; %java_home%\lib\dt.jar;%java_home%\lib\tools.jar. Note the variable value string is preceded by a "." Represents the current directory, the purpose of setting up classpath is to tell the Java execution Environment, in which directories you can find the classes or packages that you need to execute the Java program.step three: Download and install EclipseEclipse is an IDE (integrated development environment) developed for Java applications and Android. Eclipse does not need to be installed, after the download unzip the package, cut the Eclipse folder to the place where you want to install, open when you set up your working directory. There are multiple versions of Eclipse, and here you choose to download the Eclipse IDE for Java EE developers version.Fourth Step: Download and install the Android SDKWith the JDK variable environment configured and eclipse installed, the Java development environment is ready if you are just developing a common Java application. We're going to develop Android apps through eclipse, so we need to download the Android SDK (software development Kit) and install the ADT plugin in Eclipse, which lets Eclipse and Android SDK to associate. The Android SDK provides the API libraries needed to develop Android applications and the development tools needed to build, test, and debug Android applications. Turning on http://developer.android.com/sdk/index.html, we found that Google offers Android developer Tools integrated with Eclipse, Because we have already downloaded eclipse this time, we chose to download the Android SDK separately. Because Google's website we could not connect, so we can download android-sdk_r24.4.1-windows.zip version in Baidu Network: HTTPS://PAN.BAIDU.COM/S/1DELDIMD download after double-click Install, specify Android The installation directory of the SDK, in order to facilitate the use of the development tools included in the Android SDK, we set the path in the system environment variable to the tools directory under the installation directory of the Android SDK. In the Android SDK installation directory, double-click "SDK Manager.exe" to open the Android SDK Manager,android SDK Manage is responsible for downloading or updating different versions of the SDK package, we see the default installed Android SDK The manager installs only one version of SDK tools. Open the Android SDK Manager, which will get an installable version of the SDK, but there are walls in the country, sometimes there will be a failure to obtain. From the log window that pops up, we can see that the connection "https://dl-ssl.google.com" failed. We ping the command, found that the network does not pass. There are two ways to solve this:Method 1: Change the host fileFirst change the host file, the host file in the C:\Windows\System32\drivers\etc directory, with Notepad to open the "hosts" file, the following two lines of information appended to the hosts file at the end, save. If your WINDOWS8 system may not have permission to modify the host file, you can right-click the Hosts file and set the Users group to a permission that can be fully controlled by the hosts file. 203.208.46.146 dl.google.com203.208.46.146 dl-ssl.google.com The above two lines in the host file mean that local access dl.google.com and dl-ssl.google.com are directed to a server with an IP address of 203.208.46.146.change the HTTPS request on the Android SDK manage to an HTTP requestOpen the Android SDK Manager, in the Options under Tools, there is a force https://..sources to be fetched using http://. Check this one out and you can. Then open the Android SDK Manager.exe, you can normally download the various versions of Android SDK. You only need to select the installation package you want to install or update. This is a more time-consuming process, and there will be a failure to download, and the failed installation package will only need to be re-selected before it can be installed.Method 2: Use the agent feature of the SDKAndroid SDK update mirror server onlineReference address: HTTP://WWW.ANDROIDDEVTOOLS.CN/1. Chinese Academy of Sciences Open Source Association mirror station Address:
ipv4/ipv6:mirrors.opencas.cn Port: 80
ipv4/ipv6:mirrors.opencas.org Port: 80
ipv4/ipv6:mirrors.opencas.ac.cn Port: 80
2. Shanghai GDG mirror server address:
Sdk.gdgshanghai.com Port: 8000
3. Beijing University mirror server address:
ipv4:ubuntu.buct.edu.cn/Port: 80
ipv4:ubuntu.buct.cn/Port: 80
ipv6:ubuntu.buct6.edu.cn/Port: 80
4. Dalian Neusoft Institute of Information Mirror server address:
mirrors.neusoft.edu.cn Port: 80
5. Zhengzhou University Open source mirror station:
mirrors.zzu.edu.cn Port: 80How to use:
Launch Android SDK Manager, open the main interface, select "Tools", then "Options ..." and pop up the "Android SDK manager-settings" window;
In the "Android SDK manager-settings" window, fill in the "HTTP proxy server" and "HTTP Proxy port" input boxes with the above mirror server addresses (which do not contain HTTP.//, such as) and ports, and select "Force https://. Sources to be fetched using http://... check box. Click the "Close" button to close the "Android SDK manager-settings" window and return to the main screen after Setup is complete.
Select "Packages", "Reload" in turn.

PS: Here after many attempts, I use the Zhengzhou University open source image Station can download the required SDK

Then click Close, Close the dialog box, and then restart the SDK manager.

After a lengthy download and installation process, we can see that the status behind the previously selected items has changed from "Notinstalled" to "installed", which means we have successfully installed it!

Next, set the environment variable

First of all, create a new system environment variable named Android_sdk_home, the variable value is your SDK installation path, here my installation path is D:\ANDROID\ANDROID-SDK,:


Then, after the system's path variable, append;% android_sdk_home%\platform-tools;% Android_sdk_home%\tools,:


Then we can check if the Android SDK is installed successfully: enter "ADB version" in the Command line window, and the installation is successful if the following appears:

Fifth Step: Install the ADT plugin for EclipseWe have already configured the Java Development environment, installed the IDE to develop Android, downloaded the Android SDK, but Eclipse has not been associated with the Android SDK, that is, they are now independent of each other, like a gun and bullets separated. To make Android apps easier to create, run, and debug, Android's development team specifically customized a plugin for the Eclipse IDE: Android Development Tools (ADT).Method 1: Install onlineTo launch Eclipse, click on the Help menu, Install New software ..., click Add ... in the popup dialog box. Button.  Then enter in the location in the popup dialog: Http://dl-ssl.google.com/android/eclipse/,Name can enter ADT and click "OK" button. In the dialog box that pops up, select the tool you want to install, and the next step is ready.Method 2: Offline installationDownload ADT, I am the download adt-23.0.6.zip,:https://pan.baidu.com/s/1hqtivf2 launch Eclipse, click on the Help menu, Install New software ...? Click Add in the Pop-up dialog box ... Button. Then in the popup dialog box name can enter ADT, click on the location corresponding to the archive button, select the download good Adt-23.0.6.zip, as shown in:

Click on the "OK" button:

In the dialog box that pops up, select the tool you want to install, and the next step is ready.  After installation, you will be asked to restart Eclipse,eclipse will intelligently associate it with the Android SDK in the same directory according to the directory location, and if you have not installed any version of Android SDK through the SDK Manager tool, it will alert you to install them immediately. If eclipse does not automatically correlate the installation directory of the Android SDK, you can select Windows---Preferences in the open eclipse, and you will see the Android settings in the popup panel, filling in the installed SDK path,  The platform packages that you just installed in the SDK will appear, and you can complete the configuration by pressing OK. Here, we build on the Android development environment on Windows, when you use Eclipse's file--"new--" Project ...   When you create a new project, you'll see the option to build an Android project. Reference: http://blog.csdn.net/dr_neo/article/details/49870587http://www.cnblogs.com/zoupeiyang/p/4034517.html

Five steps to deploy Android development environment

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.