Android NDK development 1: configure the environment

Source: Internet
Author: User

I. Windows:
The following software must be installed in a Windows development environment:

Java JDK

Apache ANT Build System

Android SDK

Cygwin

Android NDK

Eclipse IDE

1. install Java JDK

Configure environment variables:
Create a JAVA_HOME key with the value set to the JDK installation directory.

Open the PATH key and add

; % JAVA_HOME % \ bin

Detection:

Javac-version

2. install Apache ANT Build System

Download and install:
 

Set environment variables:
Add the ANT_HOME key with the Apache ANT installation directory.

Add:; % ANT_HOME % \ bin at the end of PATH

Detection:

Ant-version

3. Install Android SDK and eclipse

Set environment variables:

New

The ANDROID_SDK_HOME key with the value of the Android SDK installation directory.

Add the following at the end of PATH:

; % ANDROID_SDK_HOME % (SDK root directory)

; % ANDROID_SDK_HOME % \ tools (the tools directory contains tools that are not related to the platform)

Tools; % ANDROID_SDK_HOME % \ platform-tools (plateform-tools directory and platform-related directory)

4. Install Cygwin:

Android NDK tools is a UNIX-Like command, and some NDK components are shell scripts. Cygwin is a Windows UNIX-Like environment.

Download and install:

1. Select "Install From Internet"

2. Search for "make", find GNU Make, and select

3. Set environment variables:
Added the CYGWIN_HOME key with a value of Cygwin's installation directory and added at the end of Path; % CYGWIN_HOME % \ bin

5. Install Android NDK

 

Set environment variables:

New

The ANDROID_NDK_HOME key value is the Android NDK installation directory, which is added at the end of PATH; % ANDROID_NDK_HOME %

5. Install Eclipse

6. Install Android ADT:
In Eclipse click Help-> Install New Software, Name input Android ADT, Location input https://dl-ssl.google.com/android/eclipse,

Select All and install.

 

 

 

Ii. MAC OS X

Install software

Xcode

Java JDK

Apache ANT Build System

GNU Make

Android SDK

Android NDK

Eclipse IDE

1. Install XCode

 

2. Check that JDK, ANT, and GNU make have been installed.

Javac-version

Ant-version

Make-version

3. download and install the Android SDK

 

Set environment variables:

Echo export ANDROID_SDK_HOME =/android-sdk-macosx> ~ /. Bash_profile

Echo export PATH =\$ ANDROID_SDK_HOME/tools: \ $ ANDROID_SDK_HOME/platformtools: \ $ PATH >> ~ /. Bash_profile

4. Download and install Android NDK

 

Set Environment Variables

Echo export ANDROID_NDK_HOME =/android/android-ndk-r8> ~ /. Bash_profile

Echo export PATH =\$ ANDROID_NDK_HOME: \$ PATH >> ~ /. Bash_profile

5. Install Eclipse

 

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.