Google announced the launch of the Android Native Development Kit 1.5, a companion tool to the Android SDK enabling programmers to build portions of their apps in native code. Available for the Windows, Mac OS X and Linux 32/64-bit platforms, the NDK offers Android developers the flexibility to implement parts of their applications using native-code languages, affording benefits like reuse of existing code and increased speeds for certain classes of applications.
According to the Android Developers Blog, the NDK provides tools and build files used to generate native code libraries from C and C++ sources as well as methods to embed the corresponding native libraries into application packages files that can be deployed on Android devices. In addition, Google promises that all future releases of the Android platform will support native system headers and libraries, starting from Android 1.5 documentation, samples and tutorials. Android engineer David Turner writes that version 1.5 of the NDK supports the ARMv5TE machine instruction set and provides stable headers for libc (the standard C library), libm (the standard math library), the JNI interface, libz (the common ZLib compression library) and liblog (used to send logcat messages to the kernel).
"Keep in mind that using the NDK will not be relevant for all Android applications," Turner adds. "As a developer, you will need to balance its benefits against its drawbacks, which are numerous! Your application will be more complicated, have reduced compatibility, have no access to framework APIs, and be harder to debug. That said, some applications that have self-contained, CPU-intensive operations that don't allocate much memory may still benefit from increased performance and the ability to reuse existing code. Some examples are signal processing, intensive physics simulations, and some kinds of data processing."
For more on the Android NDK 1.5:
- read this Android Developers Blog entry
Looking at Android 1.5--and beyond
Google unlocks Android G1, releases SDK 1.0_r2