Ask Your Question

Revision history [back]

Cannot Include Header File in JNI

I have been trying to write a JNI of OpenCV 2.4.8 FaceRecognizer for my Android project.

I have set the "include" properties for the native/jni/include folder, I tried Ctrl + click on "#include "opencv2/core/core.hpp"", and core.hpp opened successfully.

However, when I build the project, the error comes out:

fatal error: opencv2/core/core.hpp: No such file or directory

I have read lots of solutions and I have the Application.mk already fixed, but the problem still exist.

I have put the path to the sample projects:

${WorkspaceDirPath}/OpenCV4Android/OpenCV-2.4.8-android-sdk/sdk/native/jni/include

and it works, only does not work on my project.

What's happening?