The Android NDK is a companion tool to the Android SDK that lets you buildperformance-critical portions of your apps in native code. It provides headers andlibraries that allow you to build activities, handle user input, use hardware sensors,access application resources, and more, when programming in C or C++. If you writenative code, your applications are still packaged into an .apk file and they still runinside of a virtual machine on the device. The fundamental Android application modeldoes not change.
Using native code does not result in an automatic performance increase, but always increases application complexity. If you have not run into any limitationsusing the Android framework APIs, you probably do not need the NDK. Read What is the NDK? for more information about whatthe NDK offers and whether it will be useful to you.
The NDK is designed for use only in conjunction with theAndroid SDK. If you have not already installed and setup the Android SDK, pleasedo so before downloading the NDK.
Platform | Package | Size | MD5 Checksum |
---|---|---|---|
Windows | android-ndk-r7c-windows.zip | 80361003 bytes | e86184cdc4bf71d32fa9185fad8544e2 |
Mac OS X (intel) | android-ndk-r7c-darwin-x86.tar.bz2 | 73836512 bytes | 025f57feb5f32ed993a5fa7f5996477d |
Linux 32/64-bit (x86) | android-ndk-r7c-linux-x86.tar.bz2 | 63432410 bytes | 0bc21b78823dcf6f86b988203626b1fe |
Revisions
The sections below provide information and notes about successive releases ofthe NDK, as denoted by revision number.
![](http://developer.android.com/assets/images/triangle-opened.png)
This release of the NDK includes an important fix for Tegra2-based devices, and a fewadditional fixes and improvements:
-
Important bug fixes:
-
- Fixed GNU STL armeabi-v7a binaries to not crash on non-NEON devices. The files provided with NDK r7b were not configured properly, resulting in crashes on Tegra2-based devices and others when trying to use certain floating-point functions (e.g.,
cosf
,sinf
,expf
).
Important changes:
- Fixed GNU STL armeabi-v7a binaries to not crash on non-NEON devices. The files provided with NDK r7b were not configured properly, resulting in crashes on Tegra2-based devices and others when trying to use certain floating-point functions (e.g.,
-
- Added support for custom output directories through the
NDK_OUT
environment variable. When defined, this variable is used to store all intermediate generated files, instead of$PROJECT_PATH/obj
. The variable is also recognized byndk-gdb
. - Added support for building modules with hundreds or even thousands of source files by defining
LOCAL_SHORT_COMMANDS
totrue
in yourAndroid.mk
.This change forces the NDK build system to put most linker or archiver options into list files, as a work-around for command-line length limitations. See
docs/ANDROID-MK.html
for details.
Other bug fixes:
- Added support for custom output directories through the
-
- Fixed
android_getCpuCount()
implementation in thecpufeatures
helper library. On certain devices, where cores are enabled dynamically by the system, the previousimplementation would report the total number of active cores the first time the functionwas called, rather than the total number of physically available cores.
- Fixed