Unable to find mixed_sample.so

霸气de小男生 提交于 2019-12-25 00:15:08

问题


I'm trying to build tutorial-2-mixedprocess application (in android-studio) that came with the opencv-SDK 3.2.0. But my application crashes because of a missing mixed_sample library

// Load native library after(!) OpenCV initialization
System.loadLibrary("opencv_java3");     //This one is taken care in CmakeLists.txt
Log.d(TAG, "Loaded the opencv");        //This line appears on the monitor                        
System.loadLibrary("mixed_sample");   // C-R-A-S-H h h h

I looked inside OpenCV-android-sdk/sdk/native/libs directory that came with opencv-3.2.0-android-sdk.zip but *mixed_sample.so is nowhere to be found.

Where to find this file?

EDIT
The full error says following:
java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/org.opencv.samples.tutorial2-1/base.apk"],nativeLibraryDirectories=[/data/app/org.opencv.samples.tutorial2-1/lib/x86, /vendor/lib, /system/lib]]] couldn't find "libmixed_sample.so"


回答1:


In Android Studio do the following

  1. Create Folder "jniLibs" inside "src/main/"
  2. Put all your .so libraries inside "src/main/jniLibs" folder
  3. just sync gradle again and project. Run your application.

make sure you have put java and jnilibs at proper places.

can you share tree structure of project screenshot?



来源:https://stackoverflow.com/questions/44551292/unable-to-find-mixed-sample-so

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!