1

I am trying to run the Android samples of bytedeco but I constantly get a

org.bytedeco.javacv.android.recognize.example E/art: dlopen("/data/app/org.bytedeco.javacv.android.recognize.example-2/lib/arm/libjniopencv_core.so", RTLD_LAZY) failed: dlopen failed: cannot locate symbol "_ZN2cv8internal18WriteStructContextD1Ev" referenced by "libniopencv_core.so"...

This is happening in this line

opencv_face.FaceRecognizer faceRecognizer = createEigenFaceRecognizer(); in the OpenCvRecognizeActivity class

I get the error with any other OpenCV related class I try to use of opencv_core

I have not changed the dependencies in the sample app. They look like this:

compile group: 'org.bytedeco', name: 'javacv', version: '1.3.2'
compile group: 'org.bytedeco.javacpp-presets', name: 'opencv', version: '3.2.0-1.3', classifier: 'android-arm'
compile group: 'org.bytedeco.javacpp-presets', name: 'opencv', version: '3.2.0-1.3', classifier: 'android-x86'
compile group: 'org.bytedeco.javacpp-presets', name: 'ffmpeg', version: '3.2.1-1.3', classifier: 'android-arm'
compile group: 'org.bytedeco.javacpp-presets', name: 'ffmpeg', version: '3.2.1-1.3', classifier: 'android-x86'

Am I missing something? Does the setup of the app require some previous steps?

Thanks

Arun J
  • 687
  • 4
  • 14
  • 27
JAC
  • 287
  • 1
  • 10

2 Answers2

0

Not 100% sure yet but it looks the problem is either the Android version (I was working with a 5.0 device) or the device itself. I've just installed the demo app in a new phone and it does work

JAC
  • 287
  • 1
  • 10
0

Make sure your application contains all the required .so files. You can check it using Android studio, just click on the .apk file and it will show you .apk file contents. If it's not having opencv .so files then manually copy those .so files inside "lib" folder in your project and provide it's dependencies in .gradle file.

Parth
  • 137
  • 8