静态JNI的生成方法

进入cmd,首先跳转到工程中的..\app\src\main\java路径,然后键入一下命令:

javah com.example.firstapp.DataProvider

其中:com.example.firstapp为包的路径,DataProvider为包含native方法接口的类名

这样,就可以生成包含静态的jni方法的头文件,然后根据需要实现这些方法。

猜你喜欢

转载自blog.csdn.net/pkx1993/article/details/80270818