Search code examples
eclipseandroid-ndkjava-native-interfacendk-build

In ndk-r10 release, do we need to run ndk-build if already add-native-support?


I am learning NDK environment, there is lot of tutorial/example to teach on building a simple design which using NDK/JNI.

Some say we need to run ndk-build to generate the .so file, some say no need, just link the project with "add native support". Is anyone know what is the method we should use for ndk-r10 release?

Thanks


Solution

  • r10 does not change the rules of the game. You still need to run ndk-build to have the**.so** files created (and copied to correct directory).

    If in eclipse (to be more precise, in ADT) you added native support to your project, then eclipse will launch ndk-build as the first steel of building the project, so you do not need to launch ndk-build manually.

    You can see and modify parameters to ndk-build when you open project properties in eclipse. You can see output of ndk-build in Console view in eclipse. Errors and Warnings will also be seen in Problems view.

    Some people have reported that they could not add native support with latest download of the ADT bundle. Manual update often resolves this issue, search more about this on SO.