在jni.h的头文件里找到 /*
* C++ version.
*/
struct _JavaVM {
const struct JNIInvokeInterface* functions;#if defined(__cplusplus)
jint DestroyJavaVM()
{ return functions->DestroyJavaVM(this); }
jint AttachCurrentThread(JNIEnv** p_env, void* thr_args)
{ return functions->AttachCurrentThread(this, p_env, thr_args); }
jint DetachCurrentThread()
{ return functions->DetachCurrentThread(this); }
jint GetEnv(void** env, jint version)
{ return functions->GetEnv(this, env, version); }
jint AttachCurrentThreadAsDaemon(JNIEnv** p_env, void* thr_args)
{ return functions->AttachCurrentThreadAsDaemon(this, p_env, thr_args); }
#endif /*__cplusplus*/
};
这说明只支持c ++. 不支持c ?
* C++ version.
*/
struct _JavaVM {
const struct JNIInvokeInterface* functions;#if defined(__cplusplus)
jint DestroyJavaVM()
{ return functions->DestroyJavaVM(this); }
jint AttachCurrentThread(JNIEnv** p_env, void* thr_args)
{ return functions->AttachCurrentThread(this, p_env, thr_args); }
jint DetachCurrentThread()
{ return functions->DetachCurrentThread(this); }
jint GetEnv(void** env, jint version)
{ return functions->GetEnv(this, env, version); }
jint AttachCurrentThreadAsDaemon(JNIEnv** p_env, void* thr_args)
{ return functions->AttachCurrentThreadAsDaemon(this, p_env, thr_args); }
#endif /*__cplusplus*/
};
这说明只支持c ++. 不支持c ?
解决方案 »
- 让你的android程序调用c/c++库文件(windows平台)
- android GridView (图片+文字)OnItemClickListener中怎样得到图片并显示在对话框中
- 开发android应用需要第三方支付,有推荐的吗?
- Android 更改文件权限么有起作用
- android访问pc端共享文件夹
- 关于Android系统备份的问题
- 如何获得listview中的一个Item的view.
- 求解释这个TimePicker的问题
- android4.0.4下webview响应html慢的问题
- Android与PC通信,客户端运行失败
- 谁知道QQ通讯录中的那个联系人滑动时的效率问题是怎么解决的 ? 滑动时非常顺畅 .
- 请教一个问题 soundPool 音量很小
我这样操作后编译器报找不到.c文件,这是怎么?
还是楼主有另外的方法?