Search code examples
androideclipseandroid-ndkjava-native-interface

Steps to create Android Workspace with auto build JNI C++ ".so"


I have gone through this opencv Android samples link. In this link all the projects has a JNI C++ code which builds the ".so" file automatically and build the project. I need to create a sample project like the above examples, in which the C++ code builds automatically.

I have gone through few tutorials like this, which has steps to build JNI using command line but there is no steps to build it automatically/using eclipse project.

Can any one list out the steps to create a project in eclipse that builds JNI C++ files automatically?


Solution

  • I suggest you can read the article Getting Started with JNI on Android, Windows and Mac. You just need to right-click on your project and select Add Native Support. Then the IDE will automatically build the .so when you save all changes.