android JNI之 'GetObjectClass' in something not a structure or union
来源:互联网 发布:java覆盖例子 编辑:程序博客网 时间:2024/05/29 03:14
编译错误提示:
/home/miyuehu/work/WebJsTest/jni/jnitest.c:22: error: request for member ‘GetObjectClass’ in something not a structure or union
/home/miyuehu/work/WebJsTest/jni/jnitest.c:23: error: request for member ‘GetFieldID’ in something not a structure or union
注意:jni.h头文件中对于.c & .cpp采用不同的定义
jclass (JNICALL *GetObjectClass) (JNIEnv *env, jobject obj);
jclass GetObjectClass(jobject obj) {
return functions->GetObjectClass(this,obj);
}
对于*.c
jclass test_class = (*env)->GetObjectClass(env, obj);
jfieldID id_num = (*env)->GetFieldID(env, test_class, “num”, “I”);
对于 *.cpp
jclass test_class = env->GetObjectClass(obj);
jfieldID id_num = env->GetFieldID(test_class, “num”, “I”);
0 0
- android JNI之 'GetObjectClass' in something not a structure or union
- JNI遇到error: request for member 'FindClass' in something not a structure or union
- JNI遇到error: request for member 'FindClass' in something not a structure or union
- JNI遇到error: request for member 'FindClass' in something not a structure or union
- JNI遇到error: request for member 'FindClass' in something not a structure or union
- JNI遇到error: request for member 'FindClass' in something not a structure or union
- Jni使用过程中出现 error: request for member 'FindClass' in something not a structure or union,解决办法
- error: request for member 'nameLabel' in something not a structure or union 的原因
- error: request for member ‘on_url’ in something not a structure or union
- 编译报request for member '***' in something not a structure or union的原因,以及解决方法
- request for member 'flags' in something not a structure or union
- JNI_OnLoad编译错误:request for member 'GetEnv' in something not a structure or union
- C语言程序编译错误 request for member 'num' in something not a structure or union
- JNI_OnLoad编译错误:request for member 'GetEnv' in something not a structure or union
- error: request for member 'FindClass' in something not a structure or union
- Error request for member in something not a structure or union(指针类型的转换)
- C 语言编译时报错 request for member''in something not a structure or union
- C语言实现顺序线性表及request for member''in something not a structure or union
- Tomcat优化
- 解决jquery操作checkbox全选全不选无法勾选问题
- Commons-net FTPClient completePendingCommand()经常使程序死掉的原因分析以及解决方式
- whoami: cannot find name for user ID xxxx
- POJ 1163 The Triangle
- android JNI之 'GetObjectClass' in something not a structure or union
- A - Decoding Baby Boos---(2015 NEUQ_ACM summer training #1)
- HDU 4496 D-City
- Light, more light
- 大讲台分享:关于Hive常见的问题及解决方案(一)
- n个骰子的点数
- 深入解析Android的自定义布局
- java打印的说明文档
- hdu1018 Big Number stirling公式