Build Android development environment under Windows

Tool / raw material JDK eclipse ADT JDK installation and Java environment variable setting

1. JDK download address: JDK download address: http://www.oracle.com/technetwork/java/javase/downloads/index.html JDK (java development kit) is the core of the whole Java, including a series of java development things. After installation, you need to configure environment variables. 2、JAVA_ The installation path of home JDK. This environment variable does not exist and needs to be created. After creation, you can use% Java_ Home% is the unified reference path, and its value is: the installation path of JDK on your computer.

3. The path attribute already exists and can be edited directly. It is used to configure paths and simplify command input. Its value is:% Java_ HOME%\bin。

4. Classpath is used for the path of Java classes at compile time. Note that two values are set here, (.;) means that the JVM searches the current directory first. Its value is:.;% JAVA_ HOME%\lib\tools.jar。

5. After configuration, run the following command through CMD: Java - version. If javac returns information, the setting is successful.

Install eclipse 1. Eclipse download address: Eclipse download address: http://www.eclipse.org/downloads/? (select eclipse Standard Version). Eclipse is an IDE developed for Java and Android. Eclipse does not need to be installed. After extracting the decompression package, cut the eclipse folder to the place you want to install, and set your working directory when opening it.

Install Android SDK 1. Android SDK download address: Android SDK download address: http://developer.android.com/sdk/index.html 。 The andorid SDK is an Android management development kit tool that provides development kits and tools for Android platforms at all levels. Note that because we are installed independently, not integrated (integrated series tools), we need to download the SDK separately. (as shown in the figure)

2. Run the installation file and set the path of the tools folder under the installation directory into the path environment variable.

3. Go to the installation directory and run the SDK manager. There are no platforms and tools at first. You need to download them back. If the company's intranet needs to use an agent to download.

4. Go to tools - > Options... And fill in the agent. After clicking close, many platform lists will appear. Select Android tools for installation. In addition, it is recommended to download and install all the above 2.2.

Install and configure ADT 1. Install ADT, start eclipse, click Help menu - > install new software?, Click? Add… ?, Enter address: http://dl-ssl.google.com/android/eclipse/ 。

2. Select the item to be installed, complete the installation all the way to next and restart. This completes the ADT installation.

3. Configure ADT

Select window - > preferences, and you will see the Android settings item in the pop-up panel. Fill in the installed SDK path, and the platform packages just installed in the SDK will appear. Press OK to complete the configuration. At this time, the Android environment is built and the Android project can be developed.

Create the first Android project 1. Select File - > New - > other - > Android - > Android application project. 2. Enter the information required for the project application name project name package name (the name of the package where the Java class is stored is actually the path of the folder where it is stored. The. Number is the file separator. The java files we write will be placed in the SRC directory of the project. For example, com.tencent.helloworld means that the class is placed in the Src / COM / Tencent / HelloWorld folder)

3. Go next until finish, and our project is created.

4. Since the program is running on the simulator, we have not created a simulator yet, so we need to create one, and close it after creation.

5. Click the triangular run button, and then select the simulator just created, and the program starts running. Tip: it will be slow to start the simulator. Therefore, when the program is modified and needs to run again, do not close the simulator. Directly press the home or return key on the simulator to exit the app, and then press run to start again.

6. End: Congratulations! Your Android environment has been built successfully.

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>