现在直写在.c文件里实现函数就行了
jstring Java_com_jni_demo_test_helloworld(...)//按类名写好
{
...
}
那有必要再写下面这些内容吗?
JNI_OnLoad,
JNINativeMethod gMethods[] = {...};
static int registerMethods(JNIEnv *env)请高手说明这有什么区别呢?jni
jstring Java_com_jni_demo_test_helloworld(...)//按类名写好
{
...
}
那有必要再写下面这些内容吗?
JNI_OnLoad,
JNINativeMethod gMethods[] = {...};
static int registerMethods(JNIEnv *env)请高手说明这有什么区别呢?jni
JNI_OnLoad是在你程序里加载so的时候会自动调用一次