Graphics Reference
In-Depth Information
Prerequisites
Before building the topic sample code for Android NDK r9+, you need
to install several prerequisites. The Android Developer Tools are cross-
platform tools, so you can pick either Windows (Cygwin), Linux, or
Mac OS X as a build platform. In this section, we cover building under
Windows, but the instructions will be nearly equivalent on the other
platforms. The following software is required:
• Java SE Development Kit (JDK) 7 ( http://oracle.com/technetwork/java/
javase/downloads/index.html) —For Windows x64, you would install
jdk-7u45-windows-x64.exe.
• Android SDK ( http://developer.android.com/sdk/index.html)
The easiest way is to download and decompress the SDK Android
Developer Tools (ADT) bundle. For the purposes of these
instructions, the ADT will be installed to C:\Android\adt-bundle-
windows-x86_64-20130911.
• Android 4.3 (API 18)—After downloading ADT, run the SDK Manager
and install Android 4.3 (API 18).
• Android NDK ( http://developer.android.com/tools/sdk/ndk/index.
html) —Download and decompress to a directory (e.g., C:\Android\
android-ndk-r9-windows-x86_64 ) the latest Android NDK.
• Cygwin ( http://cygwin.com/) —The Android NDK uses Cygwin as
an environment for running the build tools on Windows. If you are
developing on Mac OS X or Linux, you will not need Cygwin.
• Apache Ant 1.9.2+ ( http://ant.apache.org/bindownload.cgi) —Ant
is used for building the samples with the NDK. Download and
decompress to a folder (e.g., C:\Android\apache-ant-1.9.2 ).
After installing all of the prerequisites, you need to set up your PATH
to include the Android SDK tools/ and platform-tools/ folders,
Android NDK root folder, and Ant bin/ folder. You will also need to set
your JAVA_HOME variable to point to the folder in which you installed
the JDK. For example, the following was added to the end of ~/.bashrc
in Cygwin to set up the environment for the installation directories
previously used:
export JAVA_HOME="/cygdrive/c/Program Files/Java/jdk1.7.0_40"
export ANDROID_SDK=/cygdrive/c/Android/adt-bundle-windows-
x86_64-20130911/sdk
export ANDROID_NDK=/cygdrive/c/Android/android-ndk-r9-windows
-x86_64/android-ndk-r9
 
 
Search WWH ::




Custom Search