Windows ANDROID+NDK Development Environment build (jdk[8u45]+eclipse+android sdk[r24.1.2]+adt+ndk[r10d])

Source: Internet
Author: User

first, the Android development environment to build1, install the JDK. (1) Introduction: The JDK, the Java Development Kit, is the Java language Software Development Kit. The JRE, Java Runtime Environment, is the Java Runtime Environment and is intended for Java users rather than developers.
(2) Download: Click the open Link (Oracle website), select the corresponding version of the system, I downloaded the jdk-8u45-windows-i586.exe.

(3) Installation: Double-click to install, the installation directory installed when the program is the JDK installation directory, Midway need to set up the JRE installation directory. To make the distinction, I installed the JDK in the D:\PROGRAMFILES\JAVA\JDK1.8.0_45 directory and installed the JRE in D:\ProgramFiles\Java\jre1.8.0_45 (the Jre1.8.0_45 folder needs to be created manually ) directory. After the installation is complete, you need to configure three environment variables, respectively:

JAVA_HOME:JDK installation directory, i.e. D:\ProgramFiles\Java\jdk1.8.0_45

PATH:%java_home%\bin

CLASSPATH:%java_home%\bin;.; %java_home%\lib\rt.jar;%java_home%\lib\tools.jar

(4) Check: in console input java-version, display Java version number is installed successfully.

2. Install Eclipse. (1) Introduction: Eclipse is a Java-based, extensible development Platform for developing source code.
(2) Download: Click to open the link (Eclipse website), need to download is Eclipse IDE for Java developers, I download is eclipse-java-luna-sr2-win32.zip.
(3) Installation: Eclipse does not need to install, only need to extract the compressed package into the installation directory can be extracted after the completion of the installation directory Eclipse.exe create shortcuts to the desktop, I extracted in the D:\ProgramFiles\Java directory, The installation directory for Eclipse is D:\ProgramFiles\Java\eclipse.

3. Install the Android SDK. (1) Introduction: The Android SDK provides the API libraries needed to develop Android applications and the development tools needed to build, test, and debug Android applications.
(2) Download: Click to open the link (Android website), note that the proxy server is needed here, I downloaded the version of Installer_r24.1.2-windows.exe.

(3) Install: Double click to install, I install in D:\ProgramFiles\Java\Android_SDK directory. After the installation is complete, you need to configure two environment variables, namely:

SDK_HOME:SDK installation directory, i.e. D:\ProgramFiles\Java\Android_SDK

PATH:%sdk_home%\tools

(4) Update: Open the installation directory of the SDK Manager.exe, select the version you want to update the SDK. Note that a proxy server is required here, and this step takes a long time.



4, install the ADT plugin.

(1) Description: ADT is an Android development tool on Eclipse, which is a plug-in for Eclipse, and ADT links Eclipse with the Android SDK.

(2) Install: Open Eclipse, under the Help menu, select Install New software ..., in the open window click Add,name can fill in, location is http://dl-ssl.google.com/ android/eclipse/, then select all detected items, install them, and eclipse will restart after the installation is complete. Note that a proxy server is required here.



Second, NDK development environment Construction1. Install Android NDK.

(1) Introduction: The NDK, the native development Kit,ndk, provides a range of tools to help developers quickly develop C or C + + dynamic libraries and automatically apply so to Java, packaged as APK.

(2) Download: Click the open link (Android website), note that the proxy server is needed here. The version I downloaded is android-ndk-r10d-windows-x86.exe.

(3) Installation: The downloaded files are placed in the directory to be installed for decompression, the program will be automatically extracted into a folder. I unzipped in the D:\ProgramFiles\Java directory, and the last NDK installation directory is D:\ProgramFiles\Java\android-ndk-r10d. After the installation is complete, you need to configure two environment variables, namely:

NDK_ROOT:NDK installation directory, i.e. D:\ProgramFiles\Java\android-ndk-r10d

PATH:%ndk_root%

Then open Eclipse, select Perferences under the Window menu, select the Ndk under Android in the open windows, set the NDK loaction as the NDK installation directory, i.e. D:\ProgramFiles\Java\ ANDROID-NDK-R10D, save to close.


2. Load the test case.

(1) Load project: Open Eclipse Software, select New->other under the File menu, select Android->android Project from Existing Code in the popup window, root in the popup dialog directory, select the path to Hello-jni, which is D:\ProgramFiles\Java\android-ndk-r10d\samples\hello-jni. Click Finish to load the project.


(2) New Builder: Right-click under the project Name Hellojni, select Properties, select Builders in the pop-up window, click the New button, and create a new builders. After the configuration options see:


Under the main tab:


Under the Refresh tab:


Under the Build Options tab:


After clicking OK, the system starts to compile. The information for the completion of the project compilation is as follows:


(3) Create a Test virtual machine: In order to visually see the effect of the program, we need to create a virtual machine. Under the Windows menu, select Android Virtual Device Manager, click Create in the popup dialog box to create a new virtual environment, my parameters are configured as follows:


(4) Run the program: Right-click on the project name and select Run as-> Android application, the following window will appear:


=========================== the dividing line of the rice flower ===========================

1. All installed software is summarized as follows:


2. Reference materials:

Http://www.cnblogs.com/baronzhao/archive/2012/07/10/2585173.html

Http://www.cnblogs.com/zwj911112/p/4238131.html?utm_source=tuicool

Http://www.cnblogs.com/xiaomiao/archive/2012/02/20/2360308.html

Http://www.cnblogs.com/xiaomiao/archive/2012/02/21/2361929.html

Http://www.cnblogs.com/zoupeiyang/p/4034517.html

Windows ANDROID+NDK Development Environment build (jdk[8u45]+eclipse+android sdk[r24.1.2]+adt+ndk[r10d])

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.