我工作的一个简单的OpenCV code索贝尔接受手术后才能显示图像。我已经包括了所有必要的路径的项目属性,包括 OpenCV4Android
文件夹。我决定除了一个所有的错误:
I am working on a simple OpenCV code to display an image after undergoing sobel operation. I have included all the necessary paths to the Project Properties for including the OpenCV4Android
folder. I resolved all the errors except one:
错误:方法NewStringUTF()无法解析
我列入< jni.h>
我也包含在项目的路径AndroidNDK文件夹。我的Eclipse是高度非predictable。此前,它工作得很好,当我开发在Android其它应用。 Eclipse是依赖于机器的?我能做些什么来解决这个问题?
I included <jni.h>
I have also included AndroidNDK folder in the project paths. My Eclipse is highly unpredictable. Earlier, it worked fine when i developed other application on Android. Is eclipse machine dependent? What can i do to fix this error?
推荐答案
有机会,你在 CPP使用
文件 C
语法
Chances are that you are using C
syntax in CPP
file
我有同样的错误
只需切换到正确的语法和问题都将迎刃而解 C语法
Just switch to the right syntax and Problem will be solved C syntax
return (*env)->NewStringUTF(env, "Hello from JNI !");
C ++语法
return (env)->NewStringUTF("Hello from JNI !");
切换从C到C之后++语法我的问题得到有效解决。
After switching from C to C++ syntax my problem got solved.
相关推荐
最新文章