Android Development Environment ConfigurationWindows7 built the Android development environment, integrated several strategies, modified some of these errors, and some configuration omissions to complement.
The work is good to the good, its prerequisite
August 2014 13-Dayby Lilihao q:404536204
1. Installing the JDK and Java environment variable settings
(1). JDK:
Installation package:
Http://www.oracle.com/technetwork/java/javase/downloads/index.html
You need to remember the installation path of the JDK.
(2). Configure environment Variables for Java
The configuration path under Win7 is:
Start >> Control Panel >> System and Security >> Systems >> Advanced system settings >> System variables
Several environment variables that need to be configured are:
Java_home=c:\program Files\java\jkd1.8.0_11 (the path you just installed, the default path)
Java_jre_home=%java_home%\jre
Jre_home=c:\program Files\java\jre8
Path=%android_sdk_home%\platform-tools;%android_sdk_home%\tools;%java_home%\bin;%jre_home%\bin;%java_jre_home %\bin
Classpath=.; %java_home%\lib;%java_home%\lib\tools.jar;%java_home%\lib\dt.jar;%jre_home%\lib;%jre_home%\lib\rt.jar;%java_ Jre_home%\lib;%java_jre_home%\lib\rt.jar
Test environment variables are set correctly or not:
Start >> Run Cmd>>java
Start >> Run Cmd>>javac
The usage hints are displayed
2. Install Eclipse
(1). Eclipse:
Installation package:
http://www.eclipse.org/downloads/
General Select Eclipse Standard Version
(2). Configuring the Eclipse working directory
Eclipse for Java and Android IDE, do not need to install, just set up a working directory
Workspace:e:\developer\android
3. Install the Android SDK
To be exact, download the Android SDK Manager and AVD Manager and download the available SDK automatically by downloading the SDK manager.
(1). Android SDK:
Installation package:
Http://developer.android.com/sdk/index.html
The address seems to be a river crab, need to turn over the wall to download, Web page prompts to download a separate SDK
Use an EXISTING IDE
Download the SDK tools for Windows
(2). Install the SDK and remember the installation path
E:\android-sdk
(3). Setting Environment variables
Setup method Same as Step 1 ANDROID_SDK_HOME=E:\ANDROID-SDK
(4). Test the installation of the SDK
Start >> Run cmd>>adb
Tip: Android Debug Bridge version 1.0.31.
4. Install Eclipse Plugin ADT Android provides an ADT plugin for the Eclipse IDE called Android Development Tools (ADT).1. Start Eclipse,help>>install New software>>addFill out ADT Plugin in name and fill in location http://dl-ssl.google.com/android/eclipse/2. Download the Tools window list and click Next.
3, accept the software license Agreement, the Warning window Click OK, restart the prompt window, click, Restart now.
4. Restart Eclipse and configure the ADT plugin. WINDOWS>>PREFERENCE>>ANDROID>>SDK Location
5. Before downloading the SDK, the SDK Manager recommends downloading the latest version from the official website, and there may be some situations where some packages cannot be downloaded or not in the list at all. The SDK can start the download directly from the installed Sdk-manager, or the Sdk-manager is already associated with Eclipse, and is launched through Eclipse. Prior to this, to improve the download speed of the SDK, you can make a partial modification of the Win7 host file(1). Modify the Win7 Hosts file to add the following:C:\Windows\System32\drivers\etc\hosts203.208.46.146 www.google.com
74.125.113.121 developer.android.com
203.208.46.146 dl.google.com
203.208.46.146 dl-ssl.google.com
197.80.128.44 developer.android.com
(2). Eclipse>>windows>>android SDK Manager
The entire download process lasts about 2 hours.
6. Create an Android emulator
1. Open ECLIPSE>>WINDOWS>>AVD Manager
2, new A virtual machine, the parameters are not very strict
Name: Emulator names
Target: Version with ADK
SDcard Size: How large the memory card is
Skin: Screen Size
3, after the creation, Launch, would like to create a mobile phone, the result is such a big Google screen
7. Add Android Application project in Eclipse to open eclipse. Menu barwindows>>customize perspective>>shortscuts>>android Application Project>>OK
8. Create a hello-android program1. Open eclipse,new>> Android application Project
among them:Project name : project NamesContents: Radio box A project or import an existing project
Build Target: Choose which jdk to use
Application Name: Application name
Package Name: Creating Packages
Create activity: Creates an activity if you're a Java EE programmer This is the equivalent of Struts's action class
Min SDK version:jdk version
2, creation success, directory description
SRC: java source file is the file code of the Java suffix name that we wrote, step a Mainactivity.java file created
Gen:android automatically generated a directory and created an R file in this directory
android 4.4W: library file, which is the core file of Android
Res.: directory where resource files are placed
androidmanifest.xml: Project description File
3, launch an Android emulator and put the project file run as Android application.
As a Linux server for four years, I was delighted with the first piece of Android-helloworld.