Android Handset Development Introductory article Environment configuration installation

Source: Internet
Author: User
In the second half of last year, three months of Android development, mainly to do mobile phone streaming media broadcast related content, involving TCP, UDP network communications, JSON transmission data, H.264 decoding and playback technology. Everything is hard at the beginning, do Android development first to the development of the environment to build, just started to install the Android development environment, read some technical blog, but are written from the operation, not very good for beginners to understand, in the building if encountered problems can not be a good solution. I'll explain how to quickly build an Android development environment based on some of my experiences:
One: Software preparation
1, JDK (Java Development Kit), because the vast majority of Android applications (. apk) are developed using the Java language, so we need to install the Java development environment is the JDK, the author is using JDK7, The JDK version will not have much impact on subsequent development, and if you are experiencing problems, you can install additional versions to reset the environment variables.
2, the Android SDK, the software provides the core components of Android development, you can download each version of the Android version of the SDK as needed, and each version of the SDK contains all of its supported API functions.
3, Eclipse,eclipse provides a powerful compilation, debugging, and so on the UI.
Second: Software Installation and environment variable settings
1, install the JDK, according to the different computer operating system download JDK installation, double-click installation, remember the installation of road strength, assuming installed in the C:\Program Files\java directory. After installing the JDK, you need to add the path of the JDK to the system's environment variables in order for Eclipse to use Java instructions conveniently. Right-"My Computer"-"Properties"-"advanced"-"Environment variables", create a few new user variables below.
A. New Java_home
Java_home = C:\Program files\java\jdk1.7.0_11 (Installation path for JDK)
B. New Java_jre_home
Java_jre_home =%java_home%\jre
C. New Jre_home
Jre_home = C:\Program Files\java\jre7
2, install the Android SDK, download the Android SDK installation package from the network, assuming the installation into the D:\Program FILES\ANDROID\ANDROID-SDK directory, now ANDROID-SDK contains only one Android The empty shell of the SDK, which does not have any version of the SDK, needs to double click the SDK Manager.exe in the directory to install a version of the SDK that is needed (this step can also be performed at a later time), as shown in Figure 1.

Then add the following environment variables:
A. New Android_sdk_home
Android_sdk_home = D:\Program FILES\ANDROID\ANDROID-SDK
B. New CLASSPATH
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
C. New Path
Path=%android_sdk_home%\platform-tools;%android_sdk_home%\tools;%java_home%\bin;%jre_home%\bin;%java_jre_home% \ bin;
After setting up the above environment variables, run Java,javac and ADB commands in cmd, and if the prompts are printed correctly, the above variables are set correctly.
3, install Eclipse and configure Eclipse's Android development environment. Eclipse download directly to the hard disk, run Eclipse.exe, first run needs to set the workspace path. After normal startup, in order for Eclipse to be able to create the Android project, you need to add the ADT plug-in, and the author uses the Internet to download it from Google. As shown in the following illustration:



In the illustration above, you may not select the NDK option if you do not need to compile the native functions of C + + development. Click Next to follow the prompts, and when you're done, eclipse will include the Android project creation and the options for adding related files.
4. Configure Eclipse's Android SDK path, and after the above steps, we also need to add the Android SDK environment to eclipse, after adding ADT to eclipse, click "Window"-"Preferences" You can see the Android item, click on the right side to set the Android SDK path, and after the setup is complete, the downloaded Android SDK version is listed below the right. As shown in the following illustration:

Then, after restarting Eclipse, the Android development environment is built. Next I'll comb through a few simple lessons about how to develop real Android apps, including debugging, running, and packaging into. apk files. If you have any questions, please comment and chat
Related Article

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.