1. Build an android development environment in windows win7 (32-bit)
We often build an android development environment under the XP system. What if the OS is win7?
During our daily study of android development, it is essential to set up the android development environment. How can we build the android development environment in win7, let's take a look at the steps to build the android development environment in win7:
Note: This is a win7 32-bit system.
How can we establish an environment for a win764-bit system? Go to this page to view win7 64-bit
The following describes how to build a win7 (32) android development environment:
1. First, JDK
Right-click "computer"-> properties-> advanced system settings-> Environment Variables
System variable-> New-> variable name: JAVA_HOME
Variable value: C: \ Program Files \ Java \ jdk1.6.0 _ 18 (this is only the default Program for installation in my JDK installation path, 18 supports WIN7)
System variable-> edit-> (this is generally available) variable name: Path
Add % JAVA_HOME % \ bin at the beginning of the variable value (note the symbol)
(If there is already a Path item in the bold text, you do not need to create a new one, but you need to add it directly. It is separated from the previous one)
System variable-> New-> (the variable to be created) variable name: CLASSPATH variable value:
.; % JAVA_HOME % \ lib \ dt. jar; % JAVA_HOM E % \ lib \ tools. jar; (Note the symbol)
Finally, test whether the environment variables are set successfully.
2. eclipse + sdk + adt
My sdk Version 2.2 ADT0.9.7 was previously downloaded and not updated online.
The installation and configuration of java JDK do not need to be mentioned above
Download and decompress eclipse 32-bit ide.
Load the adt to eclipse. The method is to copy the features and plugins files decompressed by the ADT to the corresponding folder of eclipse. Then, start eclipse and the sdk manager appears. The adt is successfully installed.
Load the sdk configuration path, as shown in "d: \ sdk2.2 \ tools ".
Note the differences between sdk 2.2 and 2.3. for version 2 and 2, copy the files adb, AdbWinApi. dll, and AdbWinUsbApi. dll under D: \ SDK2.2 \ platform-tools to the tools Folder.
In eclipse, go to [windows] ----- [preference] --- [Android] to set the sdk path d: \ sdk2.2
Then, the android development environment under Windows 7 is set up and tested.
Ii. Procedure for setting up the android Development Environment (64-bit) in windows win7
Note: This is a win7 (64)-bit system.
How can we build the android development environment for the 32-bit System in win7?
1. Install JDK
Download the latest JDK version as follows:
Http://www.oracle.com/technetwork/java/javase/downloads/index.html
Here I downloaded: Java SE Development Kit 6u24 for Windows x64, Multi-language, that is, this file: jdk-6u24-windows-x64.exe
Download and install. After Windows is installed, you need to set three environment variables:
JAVA_HOME indicates the JDK installation path, which is the path C: \ Program Files \ Java \ jdk1.6.0 _ 24 during installation. This path includes lib, bin, jre and other folders (it is best to set this variable, because you need to use this variable to run tomcat, eclipse, ant, etc.) PATH
Path allows the system to recognize java commands in any Path. It is set:
% JAVA_HOME % \ bin; % JAVA_HOME % \ jre \ bin
CLASSPATH
CLASSPATH is the class or lib path of the java load class. Only the class in classpath can be identified by the java command and set:
.; % JAVA_HOME % \ lib \ tools. jar
(Add. to indicate the current path)
% JAVA_HOME % refers to the previously specified JAVA_HOME.
After the preceding environment variables are set, run cmd and run the following command in the Command window to view information similar to the following:
Of course, you can also use java-fullversion under the command line to view the details of the current version. The returned information is similar to the following:
Java full version "1.6.0 _ 24-b07"
Then we can write a super simple java program: HelloWorld. java file content is as follows:
Public class HelloWorld
{
Public static void main (String args [])
{
System. out. println ("HelloWorld! ");
}
}
In sequence: javac HelloWorld. java
Java HelloWorld
To test whether it can run normally.
See:
Build a Java environment
Http://blog.csdn.net/ghj1976/archive/2010/04/29/5543428.aspx
2. Download and install Eclipse
: Http://www.eclipse.org/downloads/
Here I download: 64-bit Eclipse Helios (3.6.2) Eclipse IDE for Java Developers
That is: eclipse-java-helios-SR2-win32-x86_64.zip this file.
After downloading and decompressing the package, you can use it.
Select a Workspace for normal use.
If you need to use Eclipse to develop code for other programs, such as PHP, you can add the software supported by Eclipse as follows:
In the Eclipse Development Environment menu Help-> Install New Software open interface, select Helios-http://download.eclipse.org/releases/helios/ this site (if you are using 3.6 ), then the following list will be refreshed (it may take a while ...), Then, select the PHP Development Tools (PDT) SDK Feature under the Programming Languages classification, and click NEXT.
You can also set the JDK version in Eclipse.
In our project, right-click Properties> Java Compiler and set the level of Compiler compliance to the version we need.
Note that Eclipse does not have its own jdk, and it only needs jre to run (javac is not required), because it comes with a compiler (compile package exists in the plugin directory ).
At runtime, eclipse starts startup. jar by using the java command (windows or Linux) added to the environment during JRE installation. However, if you only use jre, because there is no source code, eclipse cannot generate type comments in the library based on the source code.
3. Set Eclipse and install Android development tools
Open the Eclipse menu Help-> install new software
Select ADD
Input Name: ADT
Location: https://dl-ssl.google.com/Android/eclipse/
Press OK
Check all the items and install them. Always press Next, accept the protocol, and then install it automatically.
4. Download the Android SDK
Download Android SDK select android-sdk_r10-windows.zip
You can download it from the following address in China:
Http://code.google.com/p/androidforchinadeveloper/downloads/list
Http://www.icewalkers.com/Linux/Software/536930/Android-SDK.html
5. Set the Android SDK path
5.1 After Eclipse is restarted, choose windows> preference> Android]
Click Browse and select the downloaded Android SDK path (decompress required)
Click Apply
5.2. In Window> Android SDK and AVD Manager, select the Android Package to be installed. In short, it is a full selection.
> Available Packages:
> Android Repository:
+ Android SDK Tools, revision 9
+ Android SDK Platform-tools, revision 2
[Install Selected]
On Avaliable Packages, select the development kit to be installed (based on your own needs, do not need to install all). online download is slow.
In this way, the Android development environment is set up:
Detailed analysis of Android SDK directories and functions
1. add-ons stores additional libraries, such as GoogleMaps. Of course, if you have installed OphoneSDK, some class libraries are also in it.
2. Here is the Android SDKAPI reference document for docs. All APIs can be found here.
3. market_licensing is used as the copyright protection component of AndroidMarket. It is generally used to release paid applications to the electronic market for anti-piracy.
4. platforms is the real file of the SDK for each platform. The SDK version is based on the APILevel. Here, for Android2.2, a folder for android-8 is displayed, android-8 is the main file of Android2.2SDK. ant is the ant compilation script, data stores some system resources, images is the simulator image file, and skins is the skin of the Android simulator, templates is the default template created by the project, android. jar is the main framework file of this version. The tools directory contains important compilation tools, such as aapt, aidl, dexdump, and dx.
5. platform-tools stores some common tools, such as adb, and files such as aapt, aidl, and dx. The Android123 prompt indicates that the tools folder in the platforms directory is somewhat different, mainly from android2.3, these tools are classified as general.
6. samples is the default sample project provided by the Android SDK. apidemos in it strongly recommends that beginners learn to run the program. For SQLite database operations, you can view the NotePad example, snake and LunarLander are good examples for game development. Home is the theme design principle in the androidm5 era for Android theme development.
7. tools is the tools Folder under the SDK root directory. It contains important tools such as ddms used to start Android debugging tools, such as logcat, screen, and file manager, draw9patch is a tool for drawing png images that can be scaled on the android platform. sqlite3 can operate the SQLite database on the PC, while monkeyrunner is a good stress testing application that simulates users' random buttons, mksdcard is the creation tool of the simulator SD image. emulator is the main program of the Android SDK simulator. However, starting from android 1.5, you must enter appropriate parameters to start the simulator, traceview is an important debugging tool on the android platform.
8. As the name suggests, usb_driver stores drivers of Official google models on the android platform, such as nexusone and nexuss. It also supports drivers of old models, such as htcdream, htcmagic, and droid of motorola.