How to include opencv inside an Android NDK project (relative paths)

asked 2015-08-19 02:54:04 -0500

Hi,

I would like to include the opencv-3 android SDK directly into my NDK project, to avoid absolute paths in Android.mk. So what I did was to move the "sdk"-folder to the project's directory, and instead of including "\native\jni\OpenCV.mk" using an absolute path, I used a relative one.

However, ndk-build then complains with:

C:\Users\User\AndroidStudioProjects\OpenCV3Native>C:\ndk\ndk-build V=1 Android NDK: ERROR:jni/Android.mk:opencv_shape: LOCAL_SRC_FILES points to a missing file Android NDK: Check that /../opencv3-sdk//native//jni//../libs/armeabi-v7a/libopencv_shape.a exists or that its path is correct C:/ndk/build/core/prebuilt-library.mk:45: * Android NDK: Aborting . Stop.*

I am quite new to android native development, so it is unclear to me what is going wrong here. Is there any way to include opencv-3 using a project relative path?

Thank you in advance, Clemens

edit retag flag offensive close merge delete