就我记忆中的几天而言,我的JNI工作得很好。现在我收到了错误:
DODJNI.h:15: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘void’
然而,这是机器创建的头文件,因此头文件应该没有错误,因为它在顶部说不修改它
/* DO NOT EDIT THIS FILE - it is machine generated */
#include <jni.h>
/* Header for class DoDJNI */
#ifndef _Included_DoDJNI
#define _Included_DoDJNI
#ifdef __cplusplus
extern "C" {
#endif
/*
* Class: DoDJNI
* Method: parseCommand
* Signature: (Ljava/lang/String;)V
*/
JNIEXPORT void JNICALL Java_DoDJNI_parseCommand
(JNIEnv *, jobject, jstring);
#ifdef __cplusplus
}
#endif
#endif