Ask Your Question

Unresolved inclusions in OpenCV android tutorial 4.

asked 2012-09-21 13:38:16 -0500

ZachTM gravatar image ZachTM flag of Canada
323 1 5 15

Hi guys I am trying to get the android openCV tutorial 4 to mix native and java code. I followed all the steps but in the jni_part.cpp I am getting a bunch of errors:

Unresolved inclusion: <opencv2/core/core.hpp>
Unresolved inclusion: <opencv2/imgproc/imgproc.hpp>
Unresolved inclusion: <opencv2/features2d/features2d.hpp>
Unresolved inclusion: <vector>

Symbol 'std' could not be resolved
Symbol 'cv' could not be resolved

Type 'Mat' could not be resolved
Type 'FastFeatureDetector' could not be resolved

I think you get the point, there is basically one or more of these on every line. I tried cleaning the project, I tried this solution. and unfortunately it did not work. Does anyone know what I might be doing wrong? Thanks!

delete close flag offensive retag edit

1 Answer

Sort by ยป oldest newest most voted

answered 2012-09-21 14:31:14 -0500

njaa gravatar image njaa
92 1 1 6

I had the same errors, but I don't know anymore how I solved it.

But these are my current settings which do work:

In the Project Properties:

  • Android -> Add the OpenCV Library
  • C/C++ build -> build command -> ${NDKROOT}/ndk-build (in Windows it's ndk-build.cmd I think)
  • C/C++ -> Environment -> add NDKROOT
  • C/C++ General -> Paths and Symbols -> Add the following:

    1. ${NDKROOT}/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/include
    2. ${NDKROOT}/sources/cxx-stl/gnu-libstdc++/include
    3. ${ProjDirPath}/../../sdk/native/jni/include
    4. ${NDKROOT}/platforms/android-9/arch-arm/usr/include
link delete flag offensive edit


This worked! Thank you so much for taking the time to write all this. I really appreciate it.

ZachTM ( 2012-09-21 15:55:59 -0500 )edit

I faced a simliar problem and solved it by adding additional path <path to>/opencv246-android-sdk/sdk/native/jni/include under "C/C++ General -> Paths and Symbols ->"

the step "Android -> Add the OpenCV Library" didn't solve it for my

pellekrogholt ( 2013-09-21 09:22:48 -0500 )edit

Login/Signup to Answer

Question tools

1 follower

subscribe to rss feed


Asked: 2012-09-21 13:38:16 -0500

Seen: 1,981 times

Last updated: Sep 21 '12