Download the Android NDK Revision 5c



The Android NDK is a companion tool to the Android SDK that lets you build performance-critical portions of your apps in native code. It provides headers and libraries 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 write native code, your applications are still packaged into an .apk file and they still run inside of a virtual machine on the device. The fundamental Android application model does 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 limitations using the Android framework APIs, you probably do not need the NDK. Read What is the NDK? for more information about what the NDK offers and whether it will be useful to you.
The NDK is designed for use only in conjunction with the Android SDK. If you have not already installed and setup the Android SDK, please do so before downloading the NDK.
PlatformPackageSizeMD5 Checksum
Windowsandroid-ndk-r5c-windows.zip61627716 bytes2c7423842fa0f46871eab118495d4b45
Mac OS X (intel)android-ndk-r5c-darwin-x86.tar.bz250714712 bytes183bfbbd85cf8e4c0bd7531e8803e75d
Linux 32/64-bit (x86)android-ndk-r5c-linux-x86.tar.bz244539890 bytes7659dfdc97026ed1d913e224d0531f61

Revisions

The sections below provide information and notes about successive releases of the NDK, as denoted by revision number.
 Android NDK, Revision 5c (June 2011)
This release of the NDK does not include any new features compared to r5b. The r5c release addresses the following problems in the r5b release:
Important bug fixes:
  • ndk-build: Fixed a rare bug that appeared when trying to perform parallel builds of debuggable projects.
  • Fixed a typo that prevented LOCAL_WHOLE_STATIC_LIBRARIES to work correctly with the new toolchain and added documentation for this indocs/ANDROID-MK.html.
  • Fixed a bug where code linked against gnustl_static crashed when run on platform releases older than API level 8 (Android 2.2).
  • ndk-gdb: Fixed a bug that caused a segmentation fault when debugging Android 3.0 or newer devices.
  • <android/input.h>: Two functions that were introduced in API level 9 (Android 2.3) were incorrect and are fixed. While this breaks the source API, the binary interface to the system is unchanged. The incorrect functions were missing a history_index parameter, and the correct definitions are shown below:
    float AMotionEvent_getHistoricalRawX(const AInputEvent* motion_event,
                                               size_t pointer_index,
                                               size_t history_index);
    float AMotionEvent_getHistoricalRawY(const AInputEvent* motion_event,
                                               size_t pointer_index,
                                               size_t history_index);
  • Updated the C library ARM binary for API level 9 (Android 2.3) to correctly expose at link time new functions that were added in that API level (for example, pthread_rwlock_init).
Minor improvements and fixes:
  • Object files are now always linked in the order they appear in LOCAL_SRC_FILES. This was not the case previously because the files were grouped by source extensions instead.
  • When import-module fails, it now prints the list of directories that were searched. This is useful to check that the NDK_MODULE_PATH definition used by the build system is correct.
  • When import-module succeeds, it now prints the directory where the module was found to the log (visible with NDK_LOG=1).
  • Increased the build speed of debuggable applications when there is a very large number of include directories in the project.
  • ndk-gdb: Better detection of adb shell failures and improved error messages.
  • <pthread.h>: Fixed the definition of PTHREAD_RWLOCK_INITIALIZER for API level 9 (Android 2.3) and higher.
  • Fixed an issue where a module could import itself, resulting in an infinite loop in GNU Make.
  • Fixed a bug that caused the build to fail if LOCAL_ARM_NEON was set to true (typo in build/core/build-binary.mk).
  • Fixed a bug that prevented the compilation of .s assembly files (.S files were okay).
 Android NDK, Revision 5 (December 2010)
 Android NDK, Revision 2 (September 2009)

infolinks

Our Partners