Introduction
We covered the environment set up in Chapter 1, Hello NDK, and JNI programming in Chapter 2, Java Native Interface. To build Android NDK applications, we'll also need to use the build and debug tools for Android NDK.
Android NDK comes with the
ndk-build
script to facilitate the easy build of any Android NDK application. This script hides the complications of invoking cross compilers, cross linkers, and so on, from developers. We'll start by introducing the usage of the ndk-build
command.
A recent release of the Android Development Tools (ADT) plugin has enabled the building of Android NDK applications from Eclipse. We'll demonstrate how to use it.
We'll explore building NDK applications for different Application Binary Interfaces (ABIs) and making use of optional CPU features. This is essential to achieve best performance on different Android devices.
Besides build, we will also introduce various debugging tools and techniques for Android NDK applications. Starting with the simple...