本篇博客主要用于记录JNI的动态注册可重复使用的代码,分别参考了JNI两种注册过程实战、Java Native Interface: Programmer’s Guide and Specification和JNI Tips等等,代码如下:
/**
* Table of methods associated with a single class.
*/
//Todo: To be changed!!!
static const char * JNIRegisterClass = "com/example/dynamicnative/MainActivity";
static JNINati[......]