The Native Development Kit (from now on, NDK) is a toolset provided by Google to allow developers using native code languages (typically, C and C++) on the application. This can allow us to perform tasks that are computationally intense with a more optimized language, or to access third-party libraries to better operate in some tasks (for example, we could use OpenCV to access and operate with images, instead of the native and not very efficient Java API).
Note
The NDK can be a powerful tool, but we advise the reader to evaluate whether it will add a benefit to your project. In many cases, NDK is not required, and a developer should never choose the toolset just because he/she feels more comfortable using it. Besides, using NDK will certainly add complexity to our project in terms of the structure and files to be handled.
Using NDK in Android can certainly bring benefits, but some pitfalls must be considered:
Code complexity increases. In addition to our Java...