Step 2 - Create the JNI Header file
- Create a folder
jni
inside $JNI/JNIHelloWorld
- In Terminal(command line) move to
$JNI/out/production/JNIHelloWorld
directory (This is where the java files get compiled to class files by IDEA; Verify the directory structure is same as the package name com/jnisample/JNIHelloWorld/JNIActivity.class)
- Create the header for the native function using
javah
$ javah $JNI/JNIHelloWorld/jni com.jnisample.JNIHelloWorld.JNIActivity
The Above command will generate a header file with name com_jnisample_JNIHelloWorld_JNIActivity.h
inside the jni
directory.
Hi,
I've a problem with string included.
helloworld.h:3:10: fatal error: 'string' file not found
My Application.mk
APP_STL := stlport_static