The Android Native Development Kit (NDK) is a companion tool to the Android SDK that lets build performance-critical portions of apps in native code or port existing libraries in C/C++ to Android. It provides headers and libraries that allows to build activities, handle user input, use hardware sensors, access application resources, and more, when programming in C/C++.
Android NDK applications that include Java code and resource files and c and/or c++source code (and sometimes assembly code). All native code is compiled into a dynamic linked library (.so file) and then called by Java in the main program using a jni mechanism:
The NDK is a powerful tool for developing Android applications because it:
- Builds performance-critical portions of your applications in native code. When using Java code, the Java-based source code needs to be interpreted into machine language using a virtual machine. In contrast, the native code is compiled and optimized into binary directly before execution. With proper use of native code, you can build high performance code in your application, such as hardware video encoding and decoding, graphics processing, and arithmetical operation.
- Reuses legacy native code. C/C++ codes can be compiled into a dynamic library that can be called by Java code with a JNI mechanism.
More information:
Latest Version: NDK Downloads
Version History: NDK Archives
Resources:
FAQ:
Books: