In-depth understanding of Android (3)-Integration of javah, NDK-Builder, and javahndk-builder with Eclipse
In the previous article, we used the javah tool to generate the C ++ header file corresponding to the native java file, but it is troublesome to generate this file, this article describes how to integrate javah and NDK-Builder in eclipse.
I. eclipse integration javah
Select External Tools Configurations...
The configuration above is explained as follows:
Location: the path of javah is configured here.
Working Directory: Path of the configuration project
Arguments: the required parameter.
Note: The configuration on linux or mac OS is as follows:
Working Directory -- $ {project_loc}/bin/classes
Arguments:-d $ {project_loc}/jni $ {java_type_name}
Ii. Configure NDK cross-compilation in eclipse
3. Add to the custom Toolbar
Select Organize Favorites...
Select javah and NDK_Builder and click OK. We can easily use these two tools.