Reputation: 762
I’ve been struggling to solve this for the last 2 days, but with no success despite the bulk of material I’ve read on the Internet. My goal is to import the Opencv libraries from Android Studio 1.3 taking advantage of the new experimental plugin for NDK. Most of the instructions and hints I’ve read are not updated and the few ones that are updated are not clear to me.
In particular I want to write c++ code that is in the middle and that interfaces by means of JNI with java and utilizes Opencv functions via its libraries and headers. This libraries are in the form:
|- jniLibs
|- armeabi-v7a
|- libopencv_core.a
|- libopencv_highgui.a
|- libopencv_objdetect.a
|- libopencv_ml.a
|- libopencv_imgproc.a
…
|- libopencv_java3.so
|- armeabi-v7a
|- libopencv_core.a
…
I put the libraries in folder jniLibs and includes in folder jni but I got error: Error:(648) undefined reference to `cv::Mat::create(int, int const*, int)' (as in my code JNI code at some time I created a Mat object).
Is it possible to do it in a simple way without relying on Android.mk and Application.mk? (and if it is not possible how to do with the new plugin? I’ve only read instructions for the old one)
Upvotes: 0
Views: 485
Reputation: 22954
As integrating ndk along with opencv in android studio is a time consuming process, so all I can do is to provide the resources which I referred recently to create an opencv project in Android Studio using ndk.
Android NDK and OpenCV Development With Android Studio
Building NDK apps with Android studio
Upvotes: 1