JNI WARNING: jstring arg has wrong type (expected Ljava/lang/Stirng;, got Lcom/example/hellojni/LocalService;)

原因

jni函数写错了

错误写法:

1 jstring
2 Java_com_example_hellojni_LocalService_getSearchResult( JNIEnv* env, jstring jquery )

正确写法:

1 jstring
2 Java_com_example_hellojni_LocalService_getSearchResult( JNIEnv* env, jobject thiz, jstring jquery )



你可能感兴趣的:(service)