Eclipse - Method NewStringUTF() could not be resolved

前端 未结 4 1988
萌比男神i
萌比男神i 2020-12-16 02:57

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 th

4条回答
  •  有刺的猬
    2020-12-16 03:31

    I had this issue. Based on my "solution," it seems to be something funny going on in Eclipse, since I had another project open with (as far as I was able to tell) the exact some properties, paths, etc., besides for being labeled a Library Project.

    Just by observing the corresponding struct in jhi.h, the callback prototypes are all there! Ctrl-click the include statement and Eclipse will even link you the reference!

    Go to the project's Properties -> C/C++ General -> Code Analysis. Click the "Use project settings" radio button (or "Configure Workspace Settings..." button). Disable (uncheck) the "Method cannot be resolved" checkbox. Click "Apply," "OK." Then for your project, refresh, clean, refresh, build.

    There must have been something I did differently in creating the new project. Or maybe it was because of the locations of the projects, or the fact that the previous was a Library. Maybe it really is an Eclipse bug? For reference, I'm using ADT v21.1.0-569685 and NDK r8e for Windows.

提交回复
热议问题