Ask Your Question

Unresolved inclusion in OpenCV+Android tutorial

asked 2012-06-26 09:46:09 -0500

icedecker gravatar image


I have followed the tutorial to run the mixed native code and java, installed the ndk stuff, and it works nicely. But in the files at jni directory the Eclipse always show a "Unresolved inclusion: <jni.h>" and other unresolved messages like as "Unresolved inclusion: <opencv2 core="" core.hpp="">".

I have searched on the net, and says that I should include, in c/c++ properties. But the tutorial examples of OpenCV+Android are not c++ projects. C/C++ perspective does not apply to these projects and I don't find in any place of Eclipse how to include, even switching to c/c++ perspective. I have the plugin cdt installed.

How I could handle it? Thanks!

edit retag flag offensive close merge delete

2 answers

Sort by » oldest newest most voted

answered 2012-07-09 07:45:02 -0500

Andrey Pavlenko gravatar image

If you open Proj Prop-s -> C/C++ General -> Paths and Sympols -> Include tab, you'll find that the project has already some include dir-s set up, but that's not enough...

I managed to fix the code indexer errors by adding one more include dir there: press Add... -> paste the following path ${NDKROOT}/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/include, check Add to all cfg and press OK, agree to re-indexig.

edit flag offensive delete link more


This solution is much better than my answer, thanks! It worked nicely.

icedecker gravatar imageicedecker ( 2012-07-09 15:18:37 -0500 )edit

Hello, i have the same problem, this solution doesn´t work for me, please could anyone suggest any solution? Thank you in advanced

forio gravatar imageforio ( 2014-06-03 12:36:28 -0500 )edit

This works for std:string issues :).. but i still get a float.h error .. anyway i could resolve that? (+1 tho)

Dhara Shah gravatar imageDhara Shah ( 2014-07-03 06:42:54 -0500 )edit

answered 2012-06-27 11:08:27 -0500

icedecker gravatar image

The following link at stackoverflow solves the problem. I get rid of the unresolved stuff, but a bunch of gcc errors appears. Anyway, for this specific question, is solved.

edit flag offensive delete link more


If you think that your issue resolved, could you please accept your own answer?

Kirill Kornyakov gravatar imageKirill Kornyakov ( 2012-07-02 10:56:09 -0500 )edit
Login/Signup to Answer

Question Tools


Asked: 2012-06-26 09:46:09 -0500

Seen: 5,170 times

Last updated: Jul 09 '12